1.1 --- a/samples/apifest1/day1/alwayscreatenewcircuit/build.xml Sat Jun 14 09:52:48 2008 +0200
1.2 +++ b/samples/apifest1/day1/alwayscreatenewcircuit/build.xml Sat Jun 14 09:52:49 2008 +0200
1.3 @@ -2,8 +2,8 @@
1.4 <!-- You may freely edit this file. See commented blocks below for -->
1.5 <!-- some examples of how to customize the build. -->
1.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
1.7 -<project name="alwayscreatenewcircuit" default="default" basedir=".">
1.8 - <description>Builds, tests, and runs the project alwayscreatenewcircuit.</description>
1.9 +<project name="alwayscreatenewcircuit_-_day1" default="default" basedir=".">
1.10 + <description>Builds, tests, and runs the project alwayscreatenewcircuit - day1.</description>
1.11 <import file="nbproject/build-impl.xml"/>
1.12 <!--
1.13
1.14 @@ -54,7 +54,7 @@
1.15
1.16 An example of overriding the target for project execution could look like this:
1.17
1.18 - <target name="run" depends="alwayscreatenewcircuit-impl.jar">
1.19 + <target name="run" depends="alwayscreatenewcircuit_-_day1-impl.jar">
1.20 <exec dir="bin" executable="launcher.exe">
1.21 <arg file="${dist.jar}"/>
1.22 </exec>
2.1 --- a/samples/apifest1/day1/alwayscreatenewcircuit/nbproject/build-impl.xml Sat Jun 14 09:52:48 2008 +0200
2.2 +++ b/samples/apifest1/day1/alwayscreatenewcircuit/nbproject/build-impl.xml Sat Jun 14 09:52:49 2008 +0200
2.3 @@ -19,7 +19,7 @@
2.4 - cleanup
2.5
2.6 -->
2.7 -<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">
2.8 +<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_-_day1-impl">
2.9 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
2.10 <!--
2.11 ======================
3.1 --- a/samples/apifest1/day1/alwayscreatenewcircuit/nbproject/genfiles.properties Sat Jun 14 09:52:48 2008 +0200
3.2 +++ b/samples/apifest1/day1/alwayscreatenewcircuit/nbproject/genfiles.properties Sat Jun 14 09:52:49 2008 +0200
3.3 @@ -1,8 +1,8 @@
3.4 -build.xml.data.CRC32=ffd6778c
3.5 -build.xml.script.CRC32=f0487089
3.6 +build.xml.data.CRC32=185d8b66
3.7 +build.xml.script.CRC32=a23b6d5e
3.8 build.xml.stylesheet.CRC32=be360661
3.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
3.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
3.11 -nbproject/build-impl.xml.data.CRC32=ffd6778c
3.12 -nbproject/build-impl.xml.script.CRC32=d54dcd8c
3.13 +nbproject/build-impl.xml.data.CRC32=185d8b66
3.14 +nbproject/build-impl.xml.script.CRC32=3efca4b9
3.15 nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
4.1 --- a/samples/apifest1/day1/elementbasedsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
4.2 +++ b/samples/apifest1/day1/elementbasedsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
4.3 @@ -3,7 +3,7 @@
4.4 <type>org.netbeans.modules.java.j2seproject</type>
4.5 <configuration>
4.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
4.7 - <name>elementbasedsolution</name>
4.8 + <name>elementbasedsolution - day1</name>
4.9 <minimum-ant-version>1.6.5</minimum-ant-version>
4.10 <source-roots>
4.11 <root id="src.dir"/>
5.1 --- a/samples/apifest1/day1/inputandoperation/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
5.2 +++ b/samples/apifest1/day1/inputandoperation/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
5.3 @@ -3,7 +3,7 @@
5.4 <type>org.netbeans.modules.java.j2seproject</type>
5.5 <configuration>
5.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
5.7 - <name>inputandoperation</name>
5.8 + <name>inputandoperation - day1</name>
5.9 <minimum-ant-version>1.6.5</minimum-ant-version>
5.10 <source-roots>
5.11 <root id="src.dir"/>
6.1 --- a/samples/apifest1/day1/parsingsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
6.2 +++ b/samples/apifest1/day1/parsingsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
6.3 @@ -3,7 +3,7 @@
6.4 <type>org.netbeans.modules.java.j2seproject</type>
6.5 <configuration>
6.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
6.7 - <name>parsingsolution</name>
6.8 + <name>parsingsolution - day1</name>
6.9 <minimum-ant-version>1.6.5</minimum-ant-version>
6.10 <source-roots>
6.11 <root id="src.dir"/>
7.1 --- a/samples/apifest1/day1/pinbasedsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
7.2 +++ b/samples/apifest1/day1/pinbasedsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
7.3 @@ -3,7 +3,7 @@
7.4 <type>org.netbeans.modules.java.j2seproject</type>
7.5 <configuration>
7.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
7.7 - <name>pinbasedsolution</name>
7.8 + <name>pinbasedsolution - day1</name>
7.9 <minimum-ant-version>1.6.5</minimum-ant-version>
7.10 <source-roots>
7.11 <root id="src.dir"/>
8.1 --- a/samples/apifest1/day1/stackbasedsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
8.2 +++ b/samples/apifest1/day1/stackbasedsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
8.3 @@ -3,7 +3,7 @@
8.4 <type>org.netbeans.modules.java.j2seproject</type>
8.5 <configuration>
8.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
8.7 - <name>stackbasedsolution</name>
8.8 + <name>stackbasedsolution - day1</name>
8.9 <minimum-ant-version>1.6.5</minimum-ant-version>
8.10 <source-roots>
8.11 <root id="src.dir"/>
9.1 --- a/samples/apifest1/day1/subclassingsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
9.2 +++ b/samples/apifest1/day1/subclassingsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
9.3 @@ -3,7 +3,7 @@
9.4 <type>org.netbeans.modules.java.j2seproject</type>
9.5 <configuration>
9.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
9.7 - <name>subclassingsolution</name>
9.8 + <name>subclassingsolution - day1</name>
9.9 <minimum-ant-version>1.6.5</minimum-ant-version>
9.10 <source-roots>
9.11 <root id="src.dir"/>
10.1 --- a/samples/apifest1/day2/alwayscreatenewcircuit/build.xml Sat Jun 14 09:52:48 2008 +0200
10.2 +++ b/samples/apifest1/day2/alwayscreatenewcircuit/build.xml Sat Jun 14 09:52:49 2008 +0200
10.3 @@ -2,8 +2,8 @@
10.4 <!-- You may freely edit this file. See commented blocks below for -->
10.5 <!-- some examples of how to customize the build. -->
10.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
10.7 -<project name="alwayscreatenewcircuit" default="default" basedir=".">
10.8 - <description>Builds, tests, and runs the project alwayscreatenewcircuit.</description>
10.9 +<project name="alwayscreatenewcircuit_-_day2" default="default" basedir=".">
10.10 + <description>Builds, tests, and runs the project alwayscreatenewcircuit - day2.</description>
10.11 <import file="nbproject/build-impl.xml"/>
10.12 <!--
10.13
10.14 @@ -54,7 +54,7 @@
10.15
10.16 An example of overriding the target for project execution could look like this:
10.17
10.18 - <target name="run" depends="alwayscreatenewcircuit-impl.jar">
10.19 + <target name="run" depends="alwayscreatenewcircuit_-_day2-impl.jar">
10.20 <exec dir="bin" executable="launcher.exe">
10.21 <arg file="${dist.jar}"/>
10.22 </exec>
11.1 --- a/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/build-impl.xml Sat Jun 14 09:52:48 2008 +0200
11.2 +++ b/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/build-impl.xml Sat Jun 14 09:52:49 2008 +0200
11.3 @@ -19,7 +19,7 @@
11.4 - cleanup
11.5
11.6 -->
11.7 -<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.8 +<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_-_day2-impl">
11.9 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
11.10 <!--
11.11 ======================
12.1 --- a/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/genfiles.properties Sat Jun 14 09:52:48 2008 +0200
12.2 +++ b/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/genfiles.properties Sat Jun 14 09:52:49 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.data.CRC32=a07dea12
12.7 +build.xml.script.CRC32=e1ea13f0
12.8 build.xml.stylesheet.CRC32=be360661
12.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
12.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
12.11 -nbproject/build-impl.xml.data.CRC32=ffd6778c
12.12 -nbproject/build-impl.xml.script.CRC32=d54dcd8c
12.13 +nbproject/build-impl.xml.data.CRC32=a07dea12
12.14 +nbproject/build-impl.xml.script.CRC32=fe9dc6b7
12.15 nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
13.1 --- a/samples/apifest1/day2/inputandoperation/nbproject/build-impl.xml Sat Jun 14 09:52:48 2008 +0200
13.2 +++ b/samples/apifest1/day2/inputandoperation/nbproject/build-impl.xml Sat Jun 14 09:52:49 2008 +0200
13.3 @@ -18,32 +18,35 @@
13.4 - applet
13.5 - cleanup
13.6
13.7 --->
13.8 -<project name="inputandoperation-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">
13.9 - <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
13.10 + -->
13.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="inputandoperation-impl">
13.12 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
13.13 <!--
13.14 - ======================
13.15 - INITIALIZATION SECTION
13.16 - ======================
13.17 - -->
13.18 + ======================
13.19 + INITIALIZATION SECTION
13.20 + ======================
13.21 + -->
13.22 <target name="-pre-init">
13.23 <!-- Empty placeholder for easier customization. -->
13.24 <!-- You can override this target in the ../build.xml file. -->
13.25 </target>
13.26 - <target name="-init-private" depends="-pre-init">
13.27 + <target depends="-pre-init" name="-init-private">
13.28 + <property file="nbproject/private/config.properties"/>
13.29 + <property file="nbproject/private/configs/${config}.properties"/>
13.30 <property file="nbproject/private/private.properties"/>
13.31 </target>
13.32 - <target name="-init-user" depends="-pre-init,-init-private">
13.33 + <target depends="-pre-init,-init-private" name="-init-user">
13.34 <property file="${user.properties.file}"/>
13.35 <!-- The two properties below are usually overridden -->
13.36 <!-- by the active platform. Just a fallback. -->
13.37 <property name="default.javac.source" value="1.4"/>
13.38 <property name="default.javac.target" value="1.4"/>
13.39 </target>
13.40 - <target name="-init-project" depends="-pre-init,-init-private,-init-user">
13.41 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
13.42 + <property file="nbproject/configs/${config}.properties"/>
13.43 <property file="nbproject/project.properties"/>
13.44 </target>
13.45 - <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
13.46 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
13.47 <available file="${manifest.file}" property="manifest.available"/>
13.48 <condition property="manifest.available+main.class">
13.49 <and>
13.50 @@ -77,7 +80,10 @@
13.51 </and>
13.52 </condition>
13.53 <condition property="no.javadoc.preview">
13.54 - <isfalse value="${javadoc.preview}"/>
13.55 + <and>
13.56 + <isset property="javadoc.preview"/>
13.57 + <isfalse value="${javadoc.preview}"/>
13.58 + </and>
13.59 </condition>
13.60 <property name="run.jvmargs" value=""/>
13.61 <property name="javac.compilerargs" value=""/>
13.62 @@ -90,12 +96,34 @@
13.63 <property name="javac.debug" value="true"/>
13.64 <property name="javadoc.preview" value="true"/>
13.65 <property name="application.args" value=""/>
13.66 + <property name="source.encoding" value="${file.encoding}"/>
13.67 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
13.68 + <and>
13.69 + <isset property="javadoc.encoding"/>
13.70 + <not>
13.71 + <equals arg1="${javadoc.encoding}" arg2=""/>
13.72 + </not>
13.73 + </and>
13.74 + </condition>
13.75 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
13.76 + <property name="includes" value="**"/>
13.77 + <property name="excludes" value=""/>
13.78 + <property name="do.depend" value="false"/>
13.79 + <condition property="do.depend.true">
13.80 + <istrue value="${do.depend}"/>
13.81 + </condition>
13.82 + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
13.83 + <and>
13.84 + <isset property="jaxws.endorsed.dir"/>
13.85 + <available file="nbproject/jaxws-build.xml"/>
13.86 + </and>
13.87 + </condition>
13.88 </target>
13.89 <target name="-post-init">
13.90 <!-- Empty placeholder for easier customization. -->
13.91 <!-- You can override this target in the ../build.xml file. -->
13.92 </target>
13.93 - <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
13.94 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
13.95 <fail unless="src.dir">Must set src.dir</fail>
13.96 <fail unless="test.src.dir">Must set test.src.dir</fail>
13.97 <fail unless="build.dir">Must set build.dir</fail>
13.98 @@ -118,41 +146,70 @@
13.99 </target>
13.100 <target name="-init-macrodef-javac">
13.101 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
13.102 - <attribute name="srcdir" default="${src.dir}"/>
13.103 - <attribute name="destdir" default="${build.classes.dir}"/>
13.104 - <attribute name="classpath" default="${javac.classpath}"/>
13.105 - <attribute name="debug" default="${javac.debug}"/>
13.106 + <attribute default="${src.dir}" name="srcdir"/>
13.107 + <attribute default="${build.classes.dir}" name="destdir"/>
13.108 + <attribute default="${javac.classpath}" name="classpath"/>
13.109 + <attribute default="${includes}" name="includes"/>
13.110 + <attribute default="${excludes}" name="excludes"/>
13.111 + <attribute default="${javac.debug}" name="debug"/>
13.112 + <attribute default="" name="sourcepath"/>
13.113 <element name="customize" optional="true"/>
13.114 <sequential>
13.115 - <depend srcdir="@{srcdir}" destdir="@{destdir}" cache="${build.dir}/depcache">
13.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}">
13.117 + <classpath>
13.118 + <path path="@{classpath}"/>
13.119 + </classpath>
13.120 + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
13.121 + <customize/>
13.122 + </javac>
13.123 + </sequential>
13.124 + </macrodef>
13.125 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
13.126 + <attribute default="${src.dir}" name="srcdir"/>
13.127 + <attribute default="${build.classes.dir}" name="destdir"/>
13.128 + <attribute default="${javac.classpath}" name="classpath"/>
13.129 + <sequential>
13.130 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
13.131 <classpath>
13.132 <path path="@{classpath}"/>
13.133 </classpath>
13.134 </depend>
13.135 - <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
13.136 - <classpath>
13.137 - <path path="@{classpath}"/>
13.138 - </classpath>
13.139 - <compilerarg line="${javac.compilerargs}"/>
13.140 - <customize/>
13.141 - </javac>
13.142 + </sequential>
13.143 + </macrodef>
13.144 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
13.145 + <attribute default="${build.classes.dir}" name="destdir"/>
13.146 + <sequential>
13.147 + <fail unless="javac.includes">Must set javac.includes</fail>
13.148 + <pathconvert pathsep="," property="javac.includes.binary">
13.149 + <path>
13.150 + <filelist dir="@{destdir}" files="${javac.includes}"/>
13.151 + </path>
13.152 + <globmapper from="*.java" to="*.class"/>
13.153 + </pathconvert>
13.154 + <delete>
13.155 + <files includes="${javac.includes.binary}"/>
13.156 + </delete>
13.157 </sequential>
13.158 </macrodef>
13.159 </target>
13.160 <target name="-init-macrodef-junit">
13.161 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
13.162 - <attribute name="includes" default="**/*Test.java"/>
13.163 + <attribute default="${includes}" name="includes"/>
13.164 + <attribute default="${excludes}" name="excludes"/>
13.165 + <attribute default="**" name="testincludes"/>
13.166 <sequential>
13.167 - <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
13.168 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
13.169 <batchtest todir="${build.test.results.dir}">
13.170 - <fileset dir="${test.src.dir}" includes="@{includes}"/>
13.171 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
13.172 + <filename name="@{testincludes}"/>
13.173 + </fileset>
13.174 </batchtest>
13.175 <classpath>
13.176 <path path="${run.test.classpath}"/>
13.177 </classpath>
13.178 <syspropertyset>
13.179 <propertyref prefix="test-sys-prop."/>
13.180 - <mapper type="glob" from="test-sys-prop.*" to="*"/>
13.181 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
13.182 </syspropertyset>
13.183 <formatter type="brief" usefile="false"/>
13.184 <formatter type="xml"/>
13.185 @@ -163,11 +220,11 @@
13.186 </target>
13.187 <target name="-init-macrodef-nbjpda">
13.188 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
13.189 - <attribute name="name" default="${main.class}"/>
13.190 - <attribute name="classpath" default="${debug.classpath}"/>
13.191 - <attribute name="stopclassname" default=""/>
13.192 + <attribute default="${main.class}" name="name"/>
13.193 + <attribute default="${debug.classpath}" name="classpath"/>
13.194 + <attribute default="" name="stopclassname"/>
13.195 <sequential>
13.196 - <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
13.197 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
13.198 <classpath>
13.199 <path path="@{classpath}"/>
13.200 </classpath>
13.201 @@ -175,24 +232,36 @@
13.202 </sequential>
13.203 </macrodef>
13.204 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
13.205 - <attribute name="dir" default="${build.classes.dir}"/>
13.206 + <attribute default="${build.classes.dir}" name="dir"/>
13.207 <sequential>
13.208 <nbjpdareload>
13.209 - <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
13.210 + <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
13.211 </nbjpdareload>
13.212 </sequential>
13.213 </macrodef>
13.214 </target>
13.215 - <target name="-init-macrodef-debug">
13.216 + <target name="-init-debug-args">
13.217 + <property name="version-output" value="java version "${ant.java.version}"/>
13.218 + <condition property="have-jdk-older-than-1.4">
13.219 + <or>
13.220 + <contains string="${version-output}" substring="java version "1.0"/>
13.221 + <contains string="${version-output}" substring="java version "1.1"/>
13.222 + <contains string="${version-output}" substring="java version "1.2"/>
13.223 + <contains string="${version-output}" substring="java version "1.3"/>
13.224 + </or>
13.225 + </condition>
13.226 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
13.227 + <istrue value="${have-jdk-older-than-1.4}"/>
13.228 + </condition>
13.229 + </target>
13.230 + <target depends="-init-debug-args" name="-init-macrodef-debug">
13.231 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
13.232 - <attribute name="classname" default="${main.class}"/>
13.233 - <attribute name="classpath" default="${debug.classpath}"/>
13.234 + <attribute default="${main.class}" name="classname"/>
13.235 + <attribute default="${debug.classpath}" name="classpath"/>
13.236 <element name="customize" optional="true"/>
13.237 <sequential>
13.238 - <java fork="true" classname="@{classname}" dir="${work.dir}">
13.239 - <jvmarg value="-Xdebug"/>
13.240 - <jvmarg value="-Xnoagent"/>
13.241 - <jvmarg value="-Djava.compiler=none"/>
13.242 + <java classname="@{classname}" dir="${work.dir}" fork="true">
13.243 + <jvmarg line="${debug-args-line}"/>
13.244 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
13.245 <jvmarg line="${run.jvmargs}"/>
13.246 <classpath>
13.247 @@ -200,7 +269,7 @@
13.248 </classpath>
13.249 <syspropertyset>
13.250 <propertyref prefix="run-sys-prop."/>
13.251 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
13.252 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
13.253 </syspropertyset>
13.254 <customize/>
13.255 </java>
13.256 @@ -209,17 +278,17 @@
13.257 </target>
13.258 <target name="-init-macrodef-java">
13.259 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
13.260 - <attribute name="classname" default="${main.class}"/>
13.261 + <attribute default="${main.class}" name="classname"/>
13.262 <element name="customize" optional="true"/>
13.263 <sequential>
13.264 - <java fork="true" classname="@{classname}" dir="${work.dir}">
13.265 + <java classname="@{classname}" dir="${work.dir}" fork="true">
13.266 <jvmarg line="${run.jvmargs}"/>
13.267 <classpath>
13.268 <path path="${run.classpath}"/>
13.269 </classpath>
13.270 <syspropertyset>
13.271 <propertyref prefix="run-sys-prop."/>
13.272 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
13.273 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
13.274 </syspropertyset>
13.275 <customize/>
13.276 </java>
13.277 @@ -228,102 +297,102 @@
13.278 </target>
13.279 <target name="-init-presetdef-jar">
13.280 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
13.281 - <jar jarfile="${dist.jar}" compress="${jar.compress}">
13.282 + <jar compress="${jar.compress}" jarfile="${dist.jar}">
13.283 <j2seproject1:fileset dir="${build.classes.dir}"/>
13.284 </jar>
13.285 </presetdef>
13.286 </target>
13.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"/>
13.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"/>
13.289 <!--
13.290 - ===================
13.291 - COMPILATION SECTION
13.292 - ===================
13.293 - -->
13.294 - <target name="deps-jar" depends="init" unless="no.deps"/>
13.295 - <target name="-pre-pre-compile" depends="init,deps-jar">
13.296 + ===================
13.297 + COMPILATION SECTION
13.298 + ===================
13.299 + -->
13.300 + <target depends="init" name="deps-jar" unless="no.deps"/>
13.301 + <target depends="init,deps-jar" name="-pre-pre-compile">
13.302 <mkdir dir="${build.classes.dir}"/>
13.303 </target>
13.304 <target name="-pre-compile">
13.305 <!-- Empty placeholder for easier customization. -->
13.306 <!-- You can override this target in the ../build.xml file. -->
13.307 </target>
13.308 - <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
13.309 + <target if="do.depend.true" name="-compile-depend">
13.310 + <j2seproject3:depend/>
13.311 + </target>
13.312 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
13.313 <j2seproject3:javac/>
13.314 <copy todir="${build.classes.dir}">
13.315 - <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
13.316 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
13.317 </copy>
13.318 </target>
13.319 <target name="-post-compile">
13.320 <!-- Empty placeholder for easier customization. -->
13.321 <!-- You can override this target in the ../build.xml file. -->
13.322 </target>
13.323 - <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
13.324 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
13.325 <target name="-pre-compile-single">
13.326 <!-- Empty placeholder for easier customization. -->
13.327 <!-- You can override this target in the ../build.xml file. -->
13.328 </target>
13.329 - <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
13.330 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
13.331 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
13.332 - <j2seproject3:javac>
13.333 - <customize>
13.334 - <patternset includes="${javac.includes}"/>
13.335 - </customize>
13.336 - </j2seproject3:javac>
13.337 + <j2seproject3:force-recompile/>
13.338 + <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
13.339 </target>
13.340 <target name="-post-compile-single">
13.341 <!-- Empty placeholder for easier customization. -->
13.342 <!-- You can override this target in the ../build.xml file. -->
13.343 </target>
13.344 - <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
13.345 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
13.346 <!--
13.347 - ====================
13.348 - JAR BUILDING SECTION
13.349 - ====================
13.350 - -->
13.351 - <target name="-pre-pre-jar" depends="init">
13.352 - <dirname property="dist.jar.dir" file="${dist.jar}"/>
13.353 + ====================
13.354 + JAR BUILDING SECTION
13.355 + ====================
13.356 + -->
13.357 + <target depends="init" name="-pre-pre-jar">
13.358 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
13.359 <mkdir dir="${dist.jar.dir}"/>
13.360 </target>
13.361 <target name="-pre-jar">
13.362 <!-- Empty placeholder for easier customization. -->
13.363 <!-- You can override this target in the ../build.xml file. -->
13.364 </target>
13.365 - <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
13.366 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
13.367 <j2seproject1:jar/>
13.368 </target>
13.369 - <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
13.370 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
13.371 <j2seproject1:jar manifest="${manifest.file}"/>
13.372 </target>
13.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">
13.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">
13.375 <j2seproject1:jar manifest="${manifest.file}">
13.376 <j2seproject1:manifest>
13.377 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
13.378 </j2seproject1:manifest>
13.379 </j2seproject1:jar>
13.380 <echo>To run this application from the command line without Ant, try:</echo>
13.381 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
13.382 - <property name="dist.jar.resolved" location="${dist.jar}"/>
13.383 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
13.384 + <property location="${dist.jar}" name="dist.jar.resolved"/>
13.385 <pathconvert property="run.classpath.with.dist.jar">
13.386 <path path="${run.classpath}"/>
13.387 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
13.388 </pathconvert>
13.389 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
13.390 </target>
13.391 - <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
13.392 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
13.393 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
13.394 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
13.395 <pathconvert property="run.classpath.without.build.classes.dir">
13.396 <path path="${run.classpath}"/>
13.397 <map from="${build.classes.dir.resolved}" to=""/>
13.398 </pathconvert>
13.399 - <pathconvert property="jar.classpath" pathsep=" ">
13.400 + <pathconvert pathsep=" " property="jar.classpath">
13.401 <path path="${run.classpath.without.build.classes.dir}"/>
13.402 <chainedmapper>
13.403 <flattenmapper/>
13.404 <globmapper from="*" to="lib/*"/>
13.405 </chainedmapper>
13.406 </pathconvert>
13.407 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
13.408 - <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
13.409 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
13.410 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
13.411 <fileset dir="${build.classes.dir}"/>
13.412 <manifest>
13.413 <attribute name="Main-Class" value="${main.class}"/>
13.414 @@ -331,183 +400,194 @@
13.415 </manifest>
13.416 </copylibs>
13.417 <echo>To run this application from the command line without Ant, try:</echo>
13.418 - <property name="dist.jar.resolved" location="${dist.jar}"/>
13.419 + <property location="${dist.jar}" name="dist.jar.resolved"/>
13.420 <echo>java -jar "${dist.jar.resolved}"</echo>
13.421 </target>
13.422 <target name="-post-jar">
13.423 <!-- Empty placeholder for easier customization. -->
13.424 <!-- You can override this target in the ../build.xml file. -->
13.425 </target>
13.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."/>
13.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"/>
13.428 <!--
13.429 - =================
13.430 - EXECUTION SECTION
13.431 - =================
13.432 - -->
13.433 - <target name="run" depends="init,compile" description="Run a main class.">
13.434 + =================
13.435 + EXECUTION SECTION
13.436 + =================
13.437 + -->
13.438 + <target depends="init,compile" description="Run a main class." name="run">
13.439 <j2seproject1:java>
13.440 <customize>
13.441 <arg line="${application.args}"/>
13.442 </customize>
13.443 </j2seproject1:java>
13.444 </target>
13.445 - <target name="run-single" depends="init,compile-single">
13.446 + <target name="-do-not-recompile">
13.447 + <property name="javac.includes.binary" value=""/>
13.448 + </target>
13.449 + <target depends="init,-do-not-recompile,compile-single" name="run-single">
13.450 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
13.451 <j2seproject1:java classname="${run.class}"/>
13.452 </target>
13.453 <!--
13.454 - =================
13.455 - DEBUGGING SECTION
13.456 - =================
13.457 - -->
13.458 - <target name="-debug-start-debugger" if="netbeans.home" depends="init">
13.459 + =================
13.460 + DEBUGGING SECTION
13.461 + =================
13.462 + -->
13.463 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
13.464 <j2seproject1:nbjpdastart name="${debug.class}"/>
13.465 </target>
13.466 - <target name="-debug-start-debuggee" depends="init,compile">
13.467 + <target depends="init,compile" name="-debug-start-debuggee">
13.468 <j2seproject3:debug>
13.469 <customize>
13.470 <arg line="${application.args}"/>
13.471 </customize>
13.472 </j2seproject3:debug>
13.473 </target>
13.474 - <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
13.475 - <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
13.476 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
13.477 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
13.478 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
13.479 </target>
13.480 - <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
13.481 - <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
13.482 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
13.483 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
13.484 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
13.485 <j2seproject3:debug classname="${debug.class}"/>
13.486 </target>
13.487 - <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
13.488 - <target name="-pre-debug-fix" depends="init">
13.489 + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
13.490 + <target depends="init" name="-pre-debug-fix">
13.491 <fail unless="fix.includes">Must set fix.includes</fail>
13.492 <property name="javac.includes" value="${fix.includes}.java"/>
13.493 </target>
13.494 - <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
13.495 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
13.496 <j2seproject1:nbjpdareload/>
13.497 </target>
13.498 - <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
13.499 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
13.500 <!--
13.501 - ===============
13.502 - JAVADOC SECTION
13.503 - ===============
13.504 - -->
13.505 - <target name="-javadoc-build" depends="init">
13.506 + ===============
13.507 + JAVADOC SECTION
13.508 + ===============
13.509 + -->
13.510 + <target depends="init" name="-javadoc-build">
13.511 <mkdir dir="${dist.javadoc.dir}"/>
13.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">
13.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}">
13.514 <classpath>
13.515 <path path="${javac.classpath}"/>
13.516 </classpath>
13.517 - <sourcepath>
13.518 - <pathelement location="${src.dir}"/>
13.519 - </sourcepath>
13.520 - <packageset dir="${src.dir}" includes="*/**"/>
13.521 - <fileset dir="${src.dir}" includes="*.java"/>
13.522 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
13.523 + <filename name="**/*.java"/>
13.524 + </fileset>
13.525 </javadoc>
13.526 </target>
13.527 - <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
13.528 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
13.529 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
13.530 </target>
13.531 - <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
13.532 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
13.533 <!--
13.534 - =========================
13.535 - JUNIT COMPILATION SECTION
13.536 - =========================
13.537 - -->
13.538 - <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
13.539 + =========================
13.540 + JUNIT COMPILATION SECTION
13.541 + =========================
13.542 + -->
13.543 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
13.544 <mkdir dir="${build.test.classes.dir}"/>
13.545 </target>
13.546 <target name="-pre-compile-test">
13.547 <!-- Empty placeholder for easier customization. -->
13.548 <!-- You can override this target in the ../build.xml file. -->
13.549 </target>
13.550 - <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
13.551 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
13.552 + <target if="do.depend.true" name="-compile-test-depend">
13.553 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
13.554 + </target>
13.555 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
13.556 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
13.557 <copy todir="${build.test.classes.dir}">
13.558 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
13.559 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
13.560 </copy>
13.561 </target>
13.562 <target name="-post-compile-test">
13.563 <!-- Empty placeholder for easier customization. -->
13.564 <!-- You can override this target in the ../build.xml file. -->
13.565 </target>
13.566 - <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
13.567 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
13.568 <target name="-pre-compile-test-single">
13.569 <!-- Empty placeholder for easier customization. -->
13.570 <!-- You can override this target in the ../build.xml file. -->
13.571 </target>
13.572 - <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
13.573 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
13.574 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
13.575 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
13.576 - <customize>
13.577 - <patternset includes="${javac.includes}"/>
13.578 - </customize>
13.579 - </j2seproject3:javac>
13.580 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
13.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}"/>
13.582 <copy todir="${build.test.classes.dir}">
13.583 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
13.584 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
13.585 </copy>
13.586 </target>
13.587 <target name="-post-compile-test-single">
13.588 <!-- Empty placeholder for easier customization. -->
13.589 <!-- You can override this target in the ../build.xml file. -->
13.590 </target>
13.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"/>
13.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"/>
13.593 <!--
13.594 - =======================
13.595 - JUNIT EXECUTION SECTION
13.596 - =======================
13.597 - -->
13.598 - <target name="-pre-test-run" if="have.tests" depends="init">
13.599 + =======================
13.600 + JUNIT EXECUTION SECTION
13.601 + =======================
13.602 + -->
13.603 + <target depends="init" if="have.tests" name="-pre-test-run">
13.604 <mkdir dir="${build.test.results.dir}"/>
13.605 </target>
13.606 - <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
13.607 - <j2seproject3:junit/>
13.608 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
13.609 + <j2seproject3:junit testincludes="**/*Test.java"/>
13.610 </target>
13.611 - <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
13.612 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
13.613 <fail if="tests.failed">Some tests failed; see details above.</fail>
13.614 </target>
13.615 - <target name="test-report" if="have.tests" depends="init"/>
13.616 - <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
13.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."/>
13.618 - <target name="-pre-test-run-single" if="have.tests" depends="init">
13.619 + <target depends="init" if="have.tests" name="test-report"/>
13.620 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
13.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"/>
13.622 + <target depends="init" if="have.tests" name="-pre-test-run-single">
13.623 <mkdir dir="${build.test.results.dir}"/>
13.624 </target>
13.625 - <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
13.626 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
13.627 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
13.628 - <j2seproject3:junit includes="${test.includes}"/>
13.629 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
13.630 </target>
13.631 - <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
13.632 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
13.633 <fail if="tests.failed">Some tests failed; see details above.</fail>
13.634 </target>
13.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."/>
13.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"/>
13.637 <!--
13.638 - =======================
13.639 - JUNIT DEBUGGING SECTION
13.640 - =======================
13.641 - -->
13.642 - <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
13.643 + =======================
13.644 + JUNIT DEBUGGING SECTION
13.645 + =======================
13.646 + -->
13.647 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
13.648 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
13.649 - <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
13.650 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
13.651 + <delete file="${test.report.file}"/>
13.652 + <mkdir dir="${build.test.results.dir}"/>
13.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}">
13.654 <customize>
13.655 - <arg line="${test.class}"/>
13.656 + <syspropertyset>
13.657 + <propertyref prefix="test-sys-prop."/>
13.658 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
13.659 + </syspropertyset>
13.660 + <arg value="${test.class}"/>
13.661 + <arg value="showoutput=true"/>
13.662 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
13.663 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
13.664 </customize>
13.665 </j2seproject3:debug>
13.666 </target>
13.667 - <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
13.668 - <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
13.669 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
13.670 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
13.671 </target>
13.672 - <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
13.673 - <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
13.674 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
13.675 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
13.676 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
13.677 </target>
13.678 - <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
13.679 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
13.680 <!--
13.681 - =========================
13.682 - APPLET EXECUTION SECTION
13.683 - =========================
13.684 - -->
13.685 - <target name="run-applet" depends="init,compile-single">
13.686 + =========================
13.687 + APPLET EXECUTION SECTION
13.688 + =========================
13.689 + -->
13.690 + <target depends="init,compile-single" name="run-applet">
13.691 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
13.692 <j2seproject1:java classname="sun.applet.AppletViewer">
13.693 <customize>
13.694 @@ -516,11 +596,11 @@
13.695 </j2seproject1:java>
13.696 </target>
13.697 <!--
13.698 - =========================
13.699 - APPLET DEBUGGING SECTION
13.700 - =========================
13.701 - -->
13.702 - <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
13.703 + =========================
13.704 + APPLET DEBUGGING SECTION
13.705 + =========================
13.706 + -->
13.707 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
13.708 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
13.709 <j2seproject3:debug classname="sun.applet.AppletViewer">
13.710 <customize>
13.711 @@ -528,14 +608,14 @@
13.712 </customize>
13.713 </j2seproject3:debug>
13.714 </target>
13.715 - <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
13.716 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
13.717 <!--
13.718 - ===============
13.719 - CLEANUP SECTION
13.720 - ===============
13.721 - -->
13.722 - <target name="deps-clean" depends="init" unless="no.deps"/>
13.723 - <target name="-do-clean" depends="init">
13.724 + ===============
13.725 + CLEANUP SECTION
13.726 + ===============
13.727 + -->
13.728 + <target depends="init" name="deps-clean" unless="no.deps"/>
13.729 + <target depends="init" name="-do-clean">
13.730 <delete dir="${build.dir}"/>
13.731 <delete dir="${dist.dir}"/>
13.732 </target>
13.733 @@ -543,5 +623,5 @@
13.734 <!-- Empty placeholder for easier customization. -->
13.735 <!-- You can override this target in the ../build.xml file. -->
13.736 </target>
13.737 - <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
13.738 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
13.739 </project>
14.1 --- a/samples/apifest1/day2/inputandoperation/nbproject/genfiles.properties Sat Jun 14 09:52:48 2008 +0200
14.2 +++ b/samples/apifest1/day2/inputandoperation/nbproject/genfiles.properties Sat Jun 14 09:52:49 2008 +0200
14.3 @@ -1,5 +1,5 @@
14.4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
14.5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
14.6 nbproject/build-impl.xml.data.CRC32=835ca895
14.7 -nbproject/build-impl.xml.script.CRC32=7f83eb6b
14.8 -nbproject/build-impl.xml.stylesheet.CRC32=c10f1eac
14.9 +nbproject/build-impl.xml.script.CRC32=d896881b
14.10 +nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
15.1 --- a/samples/apifest1/day2/inputandoperation/nbproject/project.properties Sat Jun 14 09:52:48 2008 +0200
15.2 +++ b/samples/apifest1/day2/inputandoperation/nbproject/project.properties Sat Jun 14 09:52:49 2008 +0200
15.3 @@ -15,6 +15,8 @@
15.4 dist.dir=dist
15.5 dist.jar=${dist.dir}/boolcircuit.jar
15.6 dist.javadoc.dir=${dist.dir}/javadoc
15.7 +excludes=
15.8 +includes=**
15.9 jar.compress=false
15.10 javac.classpath=
15.11 # Space-separated list of extra javac options
16.1 --- a/samples/apifest1/day2/inputandoperation/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
16.2 +++ b/samples/apifest1/day2/inputandoperation/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
16.3 @@ -3,7 +3,7 @@
16.4 <type>org.netbeans.modules.java.j2seproject</type>
16.5 <configuration>
16.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
16.7 - <name>inputandoperation</name>
16.8 + <name>inputandoperation - day2</name>
16.9 <minimum-ant-version>1.6.5</minimum-ant-version>
16.10 <source-roots>
16.11 <root id="src.dir"/>
17.1 --- a/samples/apifest1/day2/inputandoperation/src/org/netbeans/apifest/boolcircuit/Circuit.java Sat Jun 14 09:52:48 2008 +0200
17.2 +++ b/samples/apifest1/day2/inputandoperation/src/org/netbeans/apifest/boolcircuit/Circuit.java Sat Jun 14 09:52:49 2008 +0200
17.3 @@ -26,8 +26,10 @@
17.4 public static boolean evaluateBooleanOperation(Operation op) {
17.5 return op.performBooleanOperation();
17.6 }
17.7 -
17.8 +
17.9 + // BEGIN: apifest.day2.inputandoperation.addedmethod
17.10 public static double evaluateRealOperation(Operation op) {
17.11 return op.performRealOperation();
17.12 }
17.13 + // END: apifest.day2.inputandoperation.addedmethod
17.14 }
18.1 --- a/samples/apifest1/day2/pinbasedsolution/nbproject/build-impl.xml Sat Jun 14 09:52:48 2008 +0200
18.2 +++ b/samples/apifest1/day2/pinbasedsolution/nbproject/build-impl.xml Sat Jun 14 09:52:49 2008 +0200
18.3 @@ -18,32 +18,35 @@
18.4 - applet
18.5 - cleanup
18.6
18.7 --->
18.8 -<project name="pinbasedsolution-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">
18.9 - <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
18.10 + -->
18.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="pinbasedsolution-impl">
18.12 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
18.13 <!--
18.14 - ======================
18.15 - INITIALIZATION SECTION
18.16 - ======================
18.17 - -->
18.18 + ======================
18.19 + INITIALIZATION SECTION
18.20 + ======================
18.21 + -->
18.22 <target name="-pre-init">
18.23 <!-- Empty placeholder for easier customization. -->
18.24 <!-- You can override this target in the ../build.xml file. -->
18.25 </target>
18.26 - <target name="-init-private" depends="-pre-init">
18.27 + <target depends="-pre-init" name="-init-private">
18.28 + <property file="nbproject/private/config.properties"/>
18.29 + <property file="nbproject/private/configs/${config}.properties"/>
18.30 <property file="nbproject/private/private.properties"/>
18.31 </target>
18.32 - <target name="-init-user" depends="-pre-init,-init-private">
18.33 + <target depends="-pre-init,-init-private" name="-init-user">
18.34 <property file="${user.properties.file}"/>
18.35 <!-- The two properties below are usually overridden -->
18.36 <!-- by the active platform. Just a fallback. -->
18.37 <property name="default.javac.source" value="1.4"/>
18.38 <property name="default.javac.target" value="1.4"/>
18.39 </target>
18.40 - <target name="-init-project" depends="-pre-init,-init-private,-init-user">
18.41 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
18.42 + <property file="nbproject/configs/${config}.properties"/>
18.43 <property file="nbproject/project.properties"/>
18.44 </target>
18.45 - <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
18.46 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
18.47 <available file="${manifest.file}" property="manifest.available"/>
18.48 <condition property="manifest.available+main.class">
18.49 <and>
18.50 @@ -77,7 +80,10 @@
18.51 </and>
18.52 </condition>
18.53 <condition property="no.javadoc.preview">
18.54 - <isfalse value="${javadoc.preview}"/>
18.55 + <and>
18.56 + <isset property="javadoc.preview"/>
18.57 + <isfalse value="${javadoc.preview}"/>
18.58 + </and>
18.59 </condition>
18.60 <property name="run.jvmargs" value=""/>
18.61 <property name="javac.compilerargs" value=""/>
18.62 @@ -90,12 +96,34 @@
18.63 <property name="javac.debug" value="true"/>
18.64 <property name="javadoc.preview" value="true"/>
18.65 <property name="application.args" value=""/>
18.66 + <property name="source.encoding" value="${file.encoding}"/>
18.67 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
18.68 + <and>
18.69 + <isset property="javadoc.encoding"/>
18.70 + <not>
18.71 + <equals arg1="${javadoc.encoding}" arg2=""/>
18.72 + </not>
18.73 + </and>
18.74 + </condition>
18.75 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
18.76 + <property name="includes" value="**"/>
18.77 + <property name="excludes" value=""/>
18.78 + <property name="do.depend" value="false"/>
18.79 + <condition property="do.depend.true">
18.80 + <istrue value="${do.depend}"/>
18.81 + </condition>
18.82 + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
18.83 + <and>
18.84 + <isset property="jaxws.endorsed.dir"/>
18.85 + <available file="nbproject/jaxws-build.xml"/>
18.86 + </and>
18.87 + </condition>
18.88 </target>
18.89 <target name="-post-init">
18.90 <!-- Empty placeholder for easier customization. -->
18.91 <!-- You can override this target in the ../build.xml file. -->
18.92 </target>
18.93 - <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
18.94 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
18.95 <fail unless="src.dir">Must set src.dir</fail>
18.96 <fail unless="test.src.dir">Must set test.src.dir</fail>
18.97 <fail unless="build.dir">Must set build.dir</fail>
18.98 @@ -118,41 +146,70 @@
18.99 </target>
18.100 <target name="-init-macrodef-javac">
18.101 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
18.102 - <attribute name="srcdir" default="${src.dir}"/>
18.103 - <attribute name="destdir" default="${build.classes.dir}"/>
18.104 - <attribute name="classpath" default="${javac.classpath}"/>
18.105 - <attribute name="debug" default="${javac.debug}"/>
18.106 + <attribute default="${src.dir}" name="srcdir"/>
18.107 + <attribute default="${build.classes.dir}" name="destdir"/>
18.108 + <attribute default="${javac.classpath}" name="classpath"/>
18.109 + <attribute default="${includes}" name="includes"/>
18.110 + <attribute default="${excludes}" name="excludes"/>
18.111 + <attribute default="${javac.debug}" name="debug"/>
18.112 + <attribute default="" name="sourcepath"/>
18.113 <element name="customize" optional="true"/>
18.114 <sequential>
18.115 - <depend srcdir="@{srcdir}" destdir="@{destdir}" cache="${build.dir}/depcache">
18.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}">
18.117 + <classpath>
18.118 + <path path="@{classpath}"/>
18.119 + </classpath>
18.120 + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
18.121 + <customize/>
18.122 + </javac>
18.123 + </sequential>
18.124 + </macrodef>
18.125 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
18.126 + <attribute default="${src.dir}" name="srcdir"/>
18.127 + <attribute default="${build.classes.dir}" name="destdir"/>
18.128 + <attribute default="${javac.classpath}" name="classpath"/>
18.129 + <sequential>
18.130 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
18.131 <classpath>
18.132 <path path="@{classpath}"/>
18.133 </classpath>
18.134 </depend>
18.135 - <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
18.136 - <classpath>
18.137 - <path path="@{classpath}"/>
18.138 - </classpath>
18.139 - <compilerarg line="${javac.compilerargs}"/>
18.140 - <customize/>
18.141 - </javac>
18.142 + </sequential>
18.143 + </macrodef>
18.144 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
18.145 + <attribute default="${build.classes.dir}" name="destdir"/>
18.146 + <sequential>
18.147 + <fail unless="javac.includes">Must set javac.includes</fail>
18.148 + <pathconvert pathsep="," property="javac.includes.binary">
18.149 + <path>
18.150 + <filelist dir="@{destdir}" files="${javac.includes}"/>
18.151 + </path>
18.152 + <globmapper from="*.java" to="*.class"/>
18.153 + </pathconvert>
18.154 + <delete>
18.155 + <files includes="${javac.includes.binary}"/>
18.156 + </delete>
18.157 </sequential>
18.158 </macrodef>
18.159 </target>
18.160 <target name="-init-macrodef-junit">
18.161 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
18.162 - <attribute name="includes" default="**/*Test.java"/>
18.163 + <attribute default="${includes}" name="includes"/>
18.164 + <attribute default="${excludes}" name="excludes"/>
18.165 + <attribute default="**" name="testincludes"/>
18.166 <sequential>
18.167 - <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
18.168 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
18.169 <batchtest todir="${build.test.results.dir}">
18.170 - <fileset dir="${test.src.dir}" includes="@{includes}"/>
18.171 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
18.172 + <filename name="@{testincludes}"/>
18.173 + </fileset>
18.174 </batchtest>
18.175 <classpath>
18.176 <path path="${run.test.classpath}"/>
18.177 </classpath>
18.178 <syspropertyset>
18.179 <propertyref prefix="test-sys-prop."/>
18.180 - <mapper type="glob" from="test-sys-prop.*" to="*"/>
18.181 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
18.182 </syspropertyset>
18.183 <formatter type="brief" usefile="false"/>
18.184 <formatter type="xml"/>
18.185 @@ -163,11 +220,11 @@
18.186 </target>
18.187 <target name="-init-macrodef-nbjpda">
18.188 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
18.189 - <attribute name="name" default="${main.class}"/>
18.190 - <attribute name="classpath" default="${debug.classpath}"/>
18.191 - <attribute name="stopclassname" default=""/>
18.192 + <attribute default="${main.class}" name="name"/>
18.193 + <attribute default="${debug.classpath}" name="classpath"/>
18.194 + <attribute default="" name="stopclassname"/>
18.195 <sequential>
18.196 - <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
18.197 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
18.198 <classpath>
18.199 <path path="@{classpath}"/>
18.200 </classpath>
18.201 @@ -175,24 +232,36 @@
18.202 </sequential>
18.203 </macrodef>
18.204 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
18.205 - <attribute name="dir" default="${build.classes.dir}"/>
18.206 + <attribute default="${build.classes.dir}" name="dir"/>
18.207 <sequential>
18.208 <nbjpdareload>
18.209 - <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
18.210 + <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
18.211 </nbjpdareload>
18.212 </sequential>
18.213 </macrodef>
18.214 </target>
18.215 - <target name="-init-macrodef-debug">
18.216 + <target name="-init-debug-args">
18.217 + <property name="version-output" value="java version "${ant.java.version}"/>
18.218 + <condition property="have-jdk-older-than-1.4">
18.219 + <or>
18.220 + <contains string="${version-output}" substring="java version "1.0"/>
18.221 + <contains string="${version-output}" substring="java version "1.1"/>
18.222 + <contains string="${version-output}" substring="java version "1.2"/>
18.223 + <contains string="${version-output}" substring="java version "1.3"/>
18.224 + </or>
18.225 + </condition>
18.226 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
18.227 + <istrue value="${have-jdk-older-than-1.4}"/>
18.228 + </condition>
18.229 + </target>
18.230 + <target depends="-init-debug-args" name="-init-macrodef-debug">
18.231 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
18.232 - <attribute name="classname" default="${main.class}"/>
18.233 - <attribute name="classpath" default="${debug.classpath}"/>
18.234 + <attribute default="${main.class}" name="classname"/>
18.235 + <attribute default="${debug.classpath}" name="classpath"/>
18.236 <element name="customize" optional="true"/>
18.237 <sequential>
18.238 - <java fork="true" classname="@{classname}" dir="${work.dir}">
18.239 - <jvmarg value="-Xdebug"/>
18.240 - <jvmarg value="-Xnoagent"/>
18.241 - <jvmarg value="-Djava.compiler=none"/>
18.242 + <java classname="@{classname}" dir="${work.dir}" fork="true">
18.243 + <jvmarg line="${debug-args-line}"/>
18.244 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
18.245 <jvmarg line="${run.jvmargs}"/>
18.246 <classpath>
18.247 @@ -200,7 +269,7 @@
18.248 </classpath>
18.249 <syspropertyset>
18.250 <propertyref prefix="run-sys-prop."/>
18.251 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
18.252 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
18.253 </syspropertyset>
18.254 <customize/>
18.255 </java>
18.256 @@ -209,17 +278,17 @@
18.257 </target>
18.258 <target name="-init-macrodef-java">
18.259 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
18.260 - <attribute name="classname" default="${main.class}"/>
18.261 + <attribute default="${main.class}" name="classname"/>
18.262 <element name="customize" optional="true"/>
18.263 <sequential>
18.264 - <java fork="true" classname="@{classname}" dir="${work.dir}">
18.265 + <java classname="@{classname}" dir="${work.dir}" fork="true">
18.266 <jvmarg line="${run.jvmargs}"/>
18.267 <classpath>
18.268 <path path="${run.classpath}"/>
18.269 </classpath>
18.270 <syspropertyset>
18.271 <propertyref prefix="run-sys-prop."/>
18.272 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
18.273 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
18.274 </syspropertyset>
18.275 <customize/>
18.276 </java>
18.277 @@ -228,102 +297,102 @@
18.278 </target>
18.279 <target name="-init-presetdef-jar">
18.280 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
18.281 - <jar jarfile="${dist.jar}" compress="${jar.compress}">
18.282 + <jar compress="${jar.compress}" jarfile="${dist.jar}">
18.283 <j2seproject1:fileset dir="${build.classes.dir}"/>
18.284 </jar>
18.285 </presetdef>
18.286 </target>
18.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"/>
18.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"/>
18.289 <!--
18.290 - ===================
18.291 - COMPILATION SECTION
18.292 - ===================
18.293 - -->
18.294 - <target name="deps-jar" depends="init" unless="no.deps"/>
18.295 - <target name="-pre-pre-compile" depends="init,deps-jar">
18.296 + ===================
18.297 + COMPILATION SECTION
18.298 + ===================
18.299 + -->
18.300 + <target depends="init" name="deps-jar" unless="no.deps"/>
18.301 + <target depends="init,deps-jar" name="-pre-pre-compile">
18.302 <mkdir dir="${build.classes.dir}"/>
18.303 </target>
18.304 <target name="-pre-compile">
18.305 <!-- Empty placeholder for easier customization. -->
18.306 <!-- You can override this target in the ../build.xml file. -->
18.307 </target>
18.308 - <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
18.309 + <target if="do.depend.true" name="-compile-depend">
18.310 + <j2seproject3:depend/>
18.311 + </target>
18.312 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
18.313 <j2seproject3:javac/>
18.314 <copy todir="${build.classes.dir}">
18.315 - <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
18.316 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
18.317 </copy>
18.318 </target>
18.319 <target name="-post-compile">
18.320 <!-- Empty placeholder for easier customization. -->
18.321 <!-- You can override this target in the ../build.xml file. -->
18.322 </target>
18.323 - <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
18.324 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
18.325 <target name="-pre-compile-single">
18.326 <!-- Empty placeholder for easier customization. -->
18.327 <!-- You can override this target in the ../build.xml file. -->
18.328 </target>
18.329 - <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
18.330 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
18.331 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
18.332 - <j2seproject3:javac>
18.333 - <customize>
18.334 - <patternset includes="${javac.includes}"/>
18.335 - </customize>
18.336 - </j2seproject3:javac>
18.337 + <j2seproject3:force-recompile/>
18.338 + <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
18.339 </target>
18.340 <target name="-post-compile-single">
18.341 <!-- Empty placeholder for easier customization. -->
18.342 <!-- You can override this target in the ../build.xml file. -->
18.343 </target>
18.344 - <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
18.345 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
18.346 <!--
18.347 - ====================
18.348 - JAR BUILDING SECTION
18.349 - ====================
18.350 - -->
18.351 - <target name="-pre-pre-jar" depends="init">
18.352 - <dirname property="dist.jar.dir" file="${dist.jar}"/>
18.353 + ====================
18.354 + JAR BUILDING SECTION
18.355 + ====================
18.356 + -->
18.357 + <target depends="init" name="-pre-pre-jar">
18.358 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
18.359 <mkdir dir="${dist.jar.dir}"/>
18.360 </target>
18.361 <target name="-pre-jar">
18.362 <!-- Empty placeholder for easier customization. -->
18.363 <!-- You can override this target in the ../build.xml file. -->
18.364 </target>
18.365 - <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
18.366 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
18.367 <j2seproject1:jar/>
18.368 </target>
18.369 - <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
18.370 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
18.371 <j2seproject1:jar manifest="${manifest.file}"/>
18.372 </target>
18.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">
18.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">
18.375 <j2seproject1:jar manifest="${manifest.file}">
18.376 <j2seproject1:manifest>
18.377 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
18.378 </j2seproject1:manifest>
18.379 </j2seproject1:jar>
18.380 <echo>To run this application from the command line without Ant, try:</echo>
18.381 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
18.382 - <property name="dist.jar.resolved" location="${dist.jar}"/>
18.383 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
18.384 + <property location="${dist.jar}" name="dist.jar.resolved"/>
18.385 <pathconvert property="run.classpath.with.dist.jar">
18.386 <path path="${run.classpath}"/>
18.387 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
18.388 </pathconvert>
18.389 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
18.390 </target>
18.391 - <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
18.392 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
18.393 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
18.394 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
18.395 <pathconvert property="run.classpath.without.build.classes.dir">
18.396 <path path="${run.classpath}"/>
18.397 <map from="${build.classes.dir.resolved}" to=""/>
18.398 </pathconvert>
18.399 - <pathconvert property="jar.classpath" pathsep=" ">
18.400 + <pathconvert pathsep=" " property="jar.classpath">
18.401 <path path="${run.classpath.without.build.classes.dir}"/>
18.402 <chainedmapper>
18.403 <flattenmapper/>
18.404 <globmapper from="*" to="lib/*"/>
18.405 </chainedmapper>
18.406 </pathconvert>
18.407 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
18.408 - <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
18.409 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
18.410 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
18.411 <fileset dir="${build.classes.dir}"/>
18.412 <manifest>
18.413 <attribute name="Main-Class" value="${main.class}"/>
18.414 @@ -331,183 +400,194 @@
18.415 </manifest>
18.416 </copylibs>
18.417 <echo>To run this application from the command line without Ant, try:</echo>
18.418 - <property name="dist.jar.resolved" location="${dist.jar}"/>
18.419 + <property location="${dist.jar}" name="dist.jar.resolved"/>
18.420 <echo>java -jar "${dist.jar.resolved}"</echo>
18.421 </target>
18.422 <target name="-post-jar">
18.423 <!-- Empty placeholder for easier customization. -->
18.424 <!-- You can override this target in the ../build.xml file. -->
18.425 </target>
18.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."/>
18.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"/>
18.428 <!--
18.429 - =================
18.430 - EXECUTION SECTION
18.431 - =================
18.432 - -->
18.433 - <target name="run" depends="init,compile" description="Run a main class.">
18.434 + =================
18.435 + EXECUTION SECTION
18.436 + =================
18.437 + -->
18.438 + <target depends="init,compile" description="Run a main class." name="run">
18.439 <j2seproject1:java>
18.440 <customize>
18.441 <arg line="${application.args}"/>
18.442 </customize>
18.443 </j2seproject1:java>
18.444 </target>
18.445 - <target name="run-single" depends="init,compile-single">
18.446 + <target name="-do-not-recompile">
18.447 + <property name="javac.includes.binary" value=""/>
18.448 + </target>
18.449 + <target depends="init,-do-not-recompile,compile-single" name="run-single">
18.450 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
18.451 <j2seproject1:java classname="${run.class}"/>
18.452 </target>
18.453 <!--
18.454 - =================
18.455 - DEBUGGING SECTION
18.456 - =================
18.457 - -->
18.458 - <target name="-debug-start-debugger" if="netbeans.home" depends="init">
18.459 + =================
18.460 + DEBUGGING SECTION
18.461 + =================
18.462 + -->
18.463 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
18.464 <j2seproject1:nbjpdastart name="${debug.class}"/>
18.465 </target>
18.466 - <target name="-debug-start-debuggee" depends="init,compile">
18.467 + <target depends="init,compile" name="-debug-start-debuggee">
18.468 <j2seproject3:debug>
18.469 <customize>
18.470 <arg line="${application.args}"/>
18.471 </customize>
18.472 </j2seproject3:debug>
18.473 </target>
18.474 - <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
18.475 - <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
18.476 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
18.477 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
18.478 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
18.479 </target>
18.480 - <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
18.481 - <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
18.482 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
18.483 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
18.484 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
18.485 <j2seproject3:debug classname="${debug.class}"/>
18.486 </target>
18.487 - <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
18.488 - <target name="-pre-debug-fix" depends="init">
18.489 + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
18.490 + <target depends="init" name="-pre-debug-fix">
18.491 <fail unless="fix.includes">Must set fix.includes</fail>
18.492 <property name="javac.includes" value="${fix.includes}.java"/>
18.493 </target>
18.494 - <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
18.495 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
18.496 <j2seproject1:nbjpdareload/>
18.497 </target>
18.498 - <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
18.499 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
18.500 <!--
18.501 - ===============
18.502 - JAVADOC SECTION
18.503 - ===============
18.504 - -->
18.505 - <target name="-javadoc-build" depends="init">
18.506 + ===============
18.507 + JAVADOC SECTION
18.508 + ===============
18.509 + -->
18.510 + <target depends="init" name="-javadoc-build">
18.511 <mkdir dir="${dist.javadoc.dir}"/>
18.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">
18.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}">
18.514 <classpath>
18.515 <path path="${javac.classpath}"/>
18.516 </classpath>
18.517 - <sourcepath>
18.518 - <pathelement location="${src.dir}"/>
18.519 - </sourcepath>
18.520 - <packageset dir="${src.dir}" includes="*/**"/>
18.521 - <fileset dir="${src.dir}" includes="*.java"/>
18.522 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
18.523 + <filename name="**/*.java"/>
18.524 + </fileset>
18.525 </javadoc>
18.526 </target>
18.527 - <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
18.528 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
18.529 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
18.530 </target>
18.531 - <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
18.532 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
18.533 <!--
18.534 - =========================
18.535 - JUNIT COMPILATION SECTION
18.536 - =========================
18.537 - -->
18.538 - <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
18.539 + =========================
18.540 + JUNIT COMPILATION SECTION
18.541 + =========================
18.542 + -->
18.543 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
18.544 <mkdir dir="${build.test.classes.dir}"/>
18.545 </target>
18.546 <target name="-pre-compile-test">
18.547 <!-- Empty placeholder for easier customization. -->
18.548 <!-- You can override this target in the ../build.xml file. -->
18.549 </target>
18.550 - <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
18.551 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
18.552 + <target if="do.depend.true" name="-compile-test-depend">
18.553 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
18.554 + </target>
18.555 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
18.556 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
18.557 <copy todir="${build.test.classes.dir}">
18.558 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
18.559 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
18.560 </copy>
18.561 </target>
18.562 <target name="-post-compile-test">
18.563 <!-- Empty placeholder for easier customization. -->
18.564 <!-- You can override this target in the ../build.xml file. -->
18.565 </target>
18.566 - <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
18.567 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
18.568 <target name="-pre-compile-test-single">
18.569 <!-- Empty placeholder for easier customization. -->
18.570 <!-- You can override this target in the ../build.xml file. -->
18.571 </target>
18.572 - <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
18.573 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
18.574 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
18.575 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
18.576 - <customize>
18.577 - <patternset includes="${javac.includes}"/>
18.578 - </customize>
18.579 - </j2seproject3:javac>
18.580 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
18.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}"/>
18.582 <copy todir="${build.test.classes.dir}">
18.583 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
18.584 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
18.585 </copy>
18.586 </target>
18.587 <target name="-post-compile-test-single">
18.588 <!-- Empty placeholder for easier customization. -->
18.589 <!-- You can override this target in the ../build.xml file. -->
18.590 </target>
18.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"/>
18.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"/>
18.593 <!--
18.594 - =======================
18.595 - JUNIT EXECUTION SECTION
18.596 - =======================
18.597 - -->
18.598 - <target name="-pre-test-run" if="have.tests" depends="init">
18.599 + =======================
18.600 + JUNIT EXECUTION SECTION
18.601 + =======================
18.602 + -->
18.603 + <target depends="init" if="have.tests" name="-pre-test-run">
18.604 <mkdir dir="${build.test.results.dir}"/>
18.605 </target>
18.606 - <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
18.607 - <j2seproject3:junit/>
18.608 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
18.609 + <j2seproject3:junit testincludes="**/*Test.java"/>
18.610 </target>
18.611 - <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
18.612 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
18.613 <fail if="tests.failed">Some tests failed; see details above.</fail>
18.614 </target>
18.615 - <target name="test-report" if="have.tests" depends="init"/>
18.616 - <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
18.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."/>
18.618 - <target name="-pre-test-run-single" if="have.tests" depends="init">
18.619 + <target depends="init" if="have.tests" name="test-report"/>
18.620 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
18.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"/>
18.622 + <target depends="init" if="have.tests" name="-pre-test-run-single">
18.623 <mkdir dir="${build.test.results.dir}"/>
18.624 </target>
18.625 - <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
18.626 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
18.627 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
18.628 - <j2seproject3:junit includes="${test.includes}"/>
18.629 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
18.630 </target>
18.631 - <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
18.632 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
18.633 <fail if="tests.failed">Some tests failed; see details above.</fail>
18.634 </target>
18.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."/>
18.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"/>
18.637 <!--
18.638 - =======================
18.639 - JUNIT DEBUGGING SECTION
18.640 - =======================
18.641 - -->
18.642 - <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
18.643 + =======================
18.644 + JUNIT DEBUGGING SECTION
18.645 + =======================
18.646 + -->
18.647 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
18.648 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
18.649 - <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
18.650 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
18.651 + <delete file="${test.report.file}"/>
18.652 + <mkdir dir="${build.test.results.dir}"/>
18.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}">
18.654 <customize>
18.655 - <arg line="${test.class}"/>
18.656 + <syspropertyset>
18.657 + <propertyref prefix="test-sys-prop."/>
18.658 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
18.659 + </syspropertyset>
18.660 + <arg value="${test.class}"/>
18.661 + <arg value="showoutput=true"/>
18.662 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
18.663 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
18.664 </customize>
18.665 </j2seproject3:debug>
18.666 </target>
18.667 - <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
18.668 - <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
18.669 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
18.670 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
18.671 </target>
18.672 - <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
18.673 - <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
18.674 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
18.675 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
18.676 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
18.677 </target>
18.678 - <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
18.679 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
18.680 <!--
18.681 - =========================
18.682 - APPLET EXECUTION SECTION
18.683 - =========================
18.684 - -->
18.685 - <target name="run-applet" depends="init,compile-single">
18.686 + =========================
18.687 + APPLET EXECUTION SECTION
18.688 + =========================
18.689 + -->
18.690 + <target depends="init,compile-single" name="run-applet">
18.691 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
18.692 <j2seproject1:java classname="sun.applet.AppletViewer">
18.693 <customize>
18.694 @@ -516,11 +596,11 @@
18.695 </j2seproject1:java>
18.696 </target>
18.697 <!--
18.698 - =========================
18.699 - APPLET DEBUGGING SECTION
18.700 - =========================
18.701 - -->
18.702 - <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
18.703 + =========================
18.704 + APPLET DEBUGGING SECTION
18.705 + =========================
18.706 + -->
18.707 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
18.708 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
18.709 <j2seproject3:debug classname="sun.applet.AppletViewer">
18.710 <customize>
18.711 @@ -528,14 +608,14 @@
18.712 </customize>
18.713 </j2seproject3:debug>
18.714 </target>
18.715 - <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
18.716 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
18.717 <!--
18.718 - ===============
18.719 - CLEANUP SECTION
18.720 - ===============
18.721 - -->
18.722 - <target name="deps-clean" depends="init" unless="no.deps"/>
18.723 - <target name="-do-clean" depends="init">
18.724 + ===============
18.725 + CLEANUP SECTION
18.726 + ===============
18.727 + -->
18.728 + <target depends="init" name="deps-clean" unless="no.deps"/>
18.729 + <target depends="init" name="-do-clean">
18.730 <delete dir="${build.dir}"/>
18.731 <delete dir="${dist.dir}"/>
18.732 </target>
18.733 @@ -543,5 +623,5 @@
18.734 <!-- Empty placeholder for easier customization. -->
18.735 <!-- You can override this target in the ../build.xml file. -->
18.736 </target>
18.737 - <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
18.738 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
18.739 </project>
19.1 --- a/samples/apifest1/day2/pinbasedsolution/nbproject/genfiles.properties Sat Jun 14 09:52:48 2008 +0200
19.2 +++ b/samples/apifest1/day2/pinbasedsolution/nbproject/genfiles.properties Sat Jun 14 09:52:49 2008 +0200
19.3 @@ -1,8 +1,8 @@
19.4 build.xml.data.CRC32=c2d9be31
19.5 build.xml.script.CRC32=09dc18c1
19.6 -build.xml.stylesheet.CRC32=a12b3d02
19.7 +build.xml.stylesheet.CRC32=be360661
19.8 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
19.9 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
19.10 nbproject/build-impl.xml.data.CRC32=c2d9be31
19.11 -nbproject/build-impl.xml.script.CRC32=716bfc49
19.12 -nbproject/build-impl.xml.stylesheet.CRC32=c10f1eac
19.13 +nbproject/build-impl.xml.script.CRC32=c591e2ef
19.14 +nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
20.1 --- a/samples/apifest1/day2/pinbasedsolution/nbproject/project.properties Sat Jun 14 09:52:48 2008 +0200
20.2 +++ b/samples/apifest1/day2/pinbasedsolution/nbproject/project.properties Sat Jun 14 09:52:49 2008 +0200
20.3 @@ -15,6 +15,8 @@
20.4 dist.dir=dist
20.5 dist.jar=${dist.dir}/boolcircuit.jar
20.6 dist.javadoc.dir=${dist.dir}/javadoc
20.7 +excludes=
20.8 +includes=**
20.9 jar.compress=false
20.10 javac.classpath=
20.11 # Space-separated list of extra javac options
21.1 --- a/samples/apifest1/day2/pinbasedsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
21.2 +++ b/samples/apifest1/day2/pinbasedsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
21.3 @@ -3,7 +3,7 @@
21.4 <type>org.netbeans.modules.java.j2seproject</type>
21.5 <configuration>
21.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
21.7 - <name>pinbasedsolution</name>
21.8 + <name>pinbasedsolution - day2</name>
21.9 <minimum-ant-version>1.6.5</minimum-ant-version>
21.10 <source-roots>
21.11 <root id="src.dir"/>
22.1 --- a/samples/apifest1/day2/stackbasedsolution/build.xml Sat Jun 14 09:52:48 2008 +0200
22.2 +++ b/samples/apifest1/day2/stackbasedsolution/build.xml Sat Jun 14 09:52:49 2008 +0200
22.3 @@ -2,8 +2,8 @@
22.4 <!-- You may freely edit this file. See commented blocks below for -->
22.5 <!-- some examples of how to customize the build. -->
22.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
22.7 -<project name="stackbasedsolution" default="default" basedir=".">
22.8 - <description>Builds, tests, and runs the project stackbasedsolution.</description>
22.9 +<project name="stackbasedsolution_-_day2" default="default" basedir=".">
22.10 + <description>Builds, tests, and runs the project stackbasedsolution - day2.</description>
22.11 <import file="nbproject/build-impl.xml"/>
22.12 <!--
22.13
22.14 @@ -54,7 +54,7 @@
22.15
22.16 An example of overriding the target for project execution could look like this:
22.17
22.18 - <target name="run" depends="stackbasedsolution-impl.jar">
22.19 + <target name="run" depends="stackbasedsolution_-_day2-impl.jar">
22.20 <exec dir="bin" executable="launcher.exe">
22.21 <arg file="${dist.jar}"/>
22.22 </exec>
23.1 --- a/samples/apifest1/day2/stackbasedsolution/nbproject/build-impl.xml Sat Jun 14 09:52:48 2008 +0200
23.2 +++ b/samples/apifest1/day2/stackbasedsolution/nbproject/build-impl.xml Sat Jun 14 09:52:49 2008 +0200
23.3 @@ -19,7 +19,7 @@
23.4 - cleanup
23.5
23.6 -->
23.7 -<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="stackbasedsolution-impl">
23.8 +<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="stackbasedsolution_-_day2-impl">
23.9 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
23.10 <!--
23.11 ======================
24.1 --- a/samples/apifest1/day2/stackbasedsolution/nbproject/genfiles.properties Sat Jun 14 09:52:48 2008 +0200
24.2 +++ b/samples/apifest1/day2/stackbasedsolution/nbproject/genfiles.properties Sat Jun 14 09:52:49 2008 +0200
24.3 @@ -1,8 +1,8 @@
24.4 -build.xml.data.CRC32=10562595
24.5 -build.xml.script.CRC32=8e100d5a
24.6 +build.xml.data.CRC32=2c877b0f
24.7 +build.xml.script.CRC32=edec68d2
24.8 build.xml.stylesheet.CRC32=be360661
24.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
24.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
24.11 -nbproject/build-impl.xml.data.CRC32=10562595
24.12 -nbproject/build-impl.xml.script.CRC32=4a74b13c
24.13 +nbproject/build-impl.xml.data.CRC32=2c877b0f
24.14 +nbproject/build-impl.xml.script.CRC32=eb1a6fa8
24.15 nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
25.1 --- a/samples/apifest1/day2/subclassingsolution/nbproject/build-impl.xml Sat Jun 14 09:52:48 2008 +0200
25.2 +++ b/samples/apifest1/day2/subclassingsolution/nbproject/build-impl.xml Sat Jun 14 09:52:49 2008 +0200
25.3 @@ -19,7 +19,7 @@
25.4 - cleanup
25.5
25.6 -->
25.7 -<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">
25.8 +<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_-_day2-impl">
25.9 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
25.10 <!--
25.11 ======================
26.1 --- a/samples/apifest1/day2/subclassingsolution/nbproject/genfiles.properties Sat Jun 14 09:52:48 2008 +0200
26.2 +++ b/samples/apifest1/day2/subclassingsolution/nbproject/genfiles.properties Sat Jun 14 09:52:49 2008 +0200
26.3 @@ -3,6 +3,6 @@
26.4 build.xml.stylesheet.CRC32=a12b3d02
26.5 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
26.6 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
26.7 -nbproject/build-impl.xml.data.CRC32=0f6dc18a
26.8 -nbproject/build-impl.xml.script.CRC32=fde9979b
26.9 +nbproject/build-impl.xml.data.CRC32=ee4f00e2
26.10 +nbproject/build-impl.xml.script.CRC32=11d0f1e1
26.11 nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
27.1 --- a/samples/apifest1/day2/welltestedsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
27.2 +++ b/samples/apifest1/day2/welltestedsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
27.3 @@ -3,7 +3,7 @@
27.4 <type>org.netbeans.modules.java.j2seproject</type>
27.5 <configuration>
27.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
27.7 - <name>welltestedsolution</name>
27.8 + <name>welltestedsolution - day2</name>
27.9 <minimum-ant-version>1.6.5</minimum-ant-version>
27.10 <source-roots>
27.11 <root id="src.dir"/>
28.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/build.xml Sat Jun 14 09:52:48 2008 +0200
28.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/build.xml Sat Jun 14 09:52:49 2008 +0200
28.3 @@ -12,10 +12,11 @@
28.4
28.5 <target name="compile" depends="make-sure-projects-are-compiled">
28.6 <mkdir dir="build/tests"/>
28.7 + <echo level="info" message="Compiling the tests against old version of the API"/>
28.8 <javac destdir="build/tests" srcdir="test">
28.9 <classpath>
28.10 <pathelement location="${apiA}"/>
28.11 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
28.12 + <pathelement location="${junit.jar}"/>
28.13 </classpath>
28.14 </javac>
28.15 </target>
28.16 @@ -33,7 +34,9 @@
28.17
28.18 <target name="-run-binary-check" depends="compile">
28.19 <mkdir dir="build/testresultA"/>
28.20 - <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
28.21 +
28.22 + <echo level="info" message="Running the tests against old version of the API"/>
28.23 + <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
28.24 <batchtest todir="build/testresultA">
28.25 <fileset dir="test" includes="**/*.java"/>
28.26 </batchtest>
28.27 @@ -41,13 +44,14 @@
28.28 <formatter type="xml"/>
28.29 <classpath>
28.30 <pathelement location="${apiA}"/>
28.31 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
28.32 + <pathelement location="${junit.jar}"/>
28.33 <pathelement location="build/tests"/>
28.34 </classpath>
28.35 </junit>
28.36
28.37 <mkdir dir="build/testresultB"/>
28.38 - <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
28.39 + <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
28.40 + <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
28.41 <batchtest todir="build/testresultB">
28.42 <fileset dir="test" includes="**/*.java"/>
28.43 </batchtest>
28.44 @@ -55,7 +59,7 @@
28.45 <formatter type="xml"/>
28.46 <classpath>
28.47 <pathelement location="${apiB}"/>
28.48 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
28.49 + <pathelement location="${junit.jar}"/>
28.50 <pathelement location="build/tests"/>
28.51 </classpath>
28.52 </junit>
28.53 @@ -73,10 +77,13 @@
28.54 <property name="build.b" location="build/verifyitbuildsagainstB"/>
28.55 <delete dir="${build.b}"/>
28.56 <mkdir dir="${build.b}"/>
28.57 - <javac destdir="${build.b}" srcdir="test" failonerror="false">
28.58 +
28.59 +
28.60 + <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
28.61 + <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
28.62 <classpath>
28.63 <pathelement location="${apiB}"/>
28.64 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
28.65 + <pathelement location="${junit.jar}"/>
28.66 </classpath>
28.67 </javac>
28.68
29.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
29.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
29.3 @@ -4,7 +4,7 @@
29.4 <configuration>
29.5 <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
29.6 <!-- Do not use Project Properties customizer when editing this file manually. -->
29.7 - <name>testing-template</name>
29.8 + <name>testing template</name>
29.9 <properties>
29.10 <property name="ant.script">build.xml</property>
29.11 <property-file>project.properties</property-file>
29.12 @@ -54,6 +54,9 @@
29.13 <source-file>
29.14 <location>${ant.script}</location>
29.15 </source-file>
29.16 + <source-file>
29.17 + <location>project.properties</location>
29.18 + </source-file>
29.19 </items>
29.20 <context-menu>
29.21 <ide-action name="build"/>
29.22 @@ -68,7 +71,7 @@
29.23 <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
29.24 <compilation-unit>
29.25 <package-root>test</package-root>
29.26 - <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
29.27 + <classpath mode="compile">${apiA}:${junit.jar}</classpath>
29.28 <built-to>build/tests</built-to>
29.29 <source-level>1.5</source-level>
29.30 </compilation-unit>
30.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/project.properties Sat Jun 14 09:52:48 2008 +0200
30.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/project.properties Sat Jun 14 09:52:49 2008 +0200
30.3 @@ -1,9 +1,11 @@
30.4
30.5 # location to root of the repository with apifest projects
30.6 apifest=../../..
30.7 +# and where is junit?
30.8 +junit.jar=../../../../libs/dist/junit-4.4.jar
30.9
30.10 # name of a project to test
30.11 -apitotest=pinbasedsolution
30.12 +apitotest=todo:specify_this_property_in:project.properties
30.13
30.14 # the test shall expose a problem between two versions
30.15 # of one API. select the first version - dayA and a second
31.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/build.xml Sat Jun 14 09:52:48 2008 +0200
31.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/build.xml Sat Jun 14 09:52:49 2008 +0200
31.3 @@ -12,10 +12,11 @@
31.4
31.5 <target name="compile" depends="make-sure-projects-are-compiled">
31.6 <mkdir dir="build/tests"/>
31.7 + <echo level="info" message="Compiling the tests against old version of the API"/>
31.8 <javac destdir="build/tests" srcdir="test">
31.9 <classpath>
31.10 <pathelement location="${apiA}"/>
31.11 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
31.12 + <pathelement location="${junit.jar}"/>
31.13 </classpath>
31.14 </javac>
31.15 </target>
31.16 @@ -33,7 +34,9 @@
31.17
31.18 <target name="-run-binary-check" depends="compile">
31.19 <mkdir dir="build/testresultA"/>
31.20 - <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
31.21 +
31.22 + <echo level="info" message="Running the tests against old version of the API"/>
31.23 + <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
31.24 <batchtest todir="build/testresultA">
31.25 <fileset dir="test" includes="**/*.java"/>
31.26 </batchtest>
31.27 @@ -41,13 +44,14 @@
31.28 <formatter type="xml"/>
31.29 <classpath>
31.30 <pathelement location="${apiA}"/>
31.31 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
31.32 + <pathelement location="${junit.jar}"/>
31.33 <pathelement location="build/tests"/>
31.34 </classpath>
31.35 </junit>
31.36
31.37 <mkdir dir="build/testresultB"/>
31.38 - <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
31.39 + <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
31.40 + <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
31.41 <batchtest todir="build/testresultB">
31.42 <fileset dir="test" includes="**/*.java"/>
31.43 </batchtest>
31.44 @@ -55,7 +59,7 @@
31.45 <formatter type="xml"/>
31.46 <classpath>
31.47 <pathelement location="${apiB}"/>
31.48 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
31.49 + <pathelement location="${junit.jar}"/>
31.50 <pathelement location="build/tests"/>
31.51 </classpath>
31.52 </junit>
31.53 @@ -73,10 +77,13 @@
31.54 <property name="build.b" location="build/verifyitbuildsagainstB"/>
31.55 <delete dir="${build.b}"/>
31.56 <mkdir dir="${build.b}"/>
31.57 - <javac destdir="${build.b}" srcdir="test" failonerror="false">
31.58 +
31.59 +
31.60 + <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
31.61 + <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
31.62 <classpath>
31.63 <pathelement location="${apiB}"/>
31.64 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
31.65 + <pathelement location="${junit.jar}"/>
31.66 </classpath>
31.67 </javac>
31.68
32.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
32.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
32.3 @@ -54,6 +54,9 @@
32.4 <source-file>
32.5 <location>${ant.script}</location>
32.6 </source-file>
32.7 + <source-file>
32.8 + <location>project.properties</location>
32.9 + </source-file>
32.10 </items>
32.11 <context-menu>
32.12 <ide-action name="build"/>
32.13 @@ -68,7 +71,7 @@
32.14 <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
32.15 <compilation-unit>
32.16 <package-root>test</package-root>
32.17 - <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
32.18 + <classpath mode="compile">${apiA}:${junit.jar}</classpath>
32.19 <built-to>build/tests</built-to>
32.20 <source-level>1.5</source-level>
32.21 </compilation-unit>
33.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/project.properties Sat Jun 14 09:52:48 2008 +0200
33.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/project.properties Sat Jun 14 09:52:49 2008 +0200
33.3 @@ -1,6 +1,8 @@
33.4
33.5 # location to root of the repository with apifest projects
33.6 apifest=../../..
33.7 +# and where is junit?
33.8 +junit.jar=../../../../libs/dist/junit-4.4.jar
33.9
33.10 # name of a project to test
33.11 apitotest=stackbasedsolution
34.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/test/apifest/CircuitTest.java Sat Jun 14 09:52:48 2008 +0200
34.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/test/apifest/CircuitTest.java Sat Jun 14 09:52:49 2008 +0200
34.3 @@ -47,6 +47,7 @@
34.4
34.5 /** Write a test that works with version from day A and fails with version B.
34.6 */
34.7 +// BEGIN: apifest.day3.against-stackbasedsolution.CircuitTest
34.8 public class CircuitTest extends TestCase {
34.9 public CircuitTest(String n) {
34.10 super(n);
34.11 @@ -56,3 +57,4 @@
34.12 Circuit c = CircuitFactory.getBasicCircuit(null);
34.13 }
34.14 }
34.15 +// END: apifest.day3.against-stackbasedsolution.CircuitTest
35.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/build.xml Sat Jun 14 09:52:48 2008 +0200
35.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/build.xml Sat Jun 14 09:52:49 2008 +0200
35.3 @@ -12,10 +12,11 @@
35.4
35.5 <target name="compile" depends="make-sure-projects-are-compiled">
35.6 <mkdir dir="build/tests"/>
35.7 + <echo level="info" message="Compiling the tests against old version of the API"/>
35.8 <javac destdir="build/tests" srcdir="test">
35.9 <classpath>
35.10 <pathelement location="${apiA}"/>
35.11 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
35.12 + <pathelement location="${junit.jar}"/>
35.13 </classpath>
35.14 </javac>
35.15 </target>
35.16 @@ -33,7 +34,9 @@
35.17
35.18 <target name="-run-binary-check" depends="compile">
35.19 <mkdir dir="build/testresultA"/>
35.20 - <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
35.21 +
35.22 + <echo level="info" message="Running the tests against old version of the API"/>
35.23 + <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
35.24 <batchtest todir="build/testresultA">
35.25 <fileset dir="test" includes="**/*.java"/>
35.26 </batchtest>
35.27 @@ -41,13 +44,14 @@
35.28 <formatter type="xml"/>
35.29 <classpath>
35.30 <pathelement location="${apiA}"/>
35.31 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
35.32 + <pathelement location="${junit.jar}"/>
35.33 <pathelement location="build/tests"/>
35.34 </classpath>
35.35 </junit>
35.36
35.37 <mkdir dir="build/testresultB"/>
35.38 - <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
35.39 + <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
35.40 + <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
35.41 <batchtest todir="build/testresultB">
35.42 <fileset dir="test" includes="**/*.java"/>
35.43 </batchtest>
35.44 @@ -55,7 +59,7 @@
35.45 <formatter type="xml"/>
35.46 <classpath>
35.47 <pathelement location="${apiB}"/>
35.48 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
35.49 + <pathelement location="${junit.jar}"/>
35.50 <pathelement location="build/tests"/>
35.51 </classpath>
35.52 </junit>
35.53 @@ -73,10 +77,13 @@
35.54 <property name="build.b" location="build/verifyitbuildsagainstB"/>
35.55 <delete dir="${build.b}"/>
35.56 <mkdir dir="${build.b}"/>
35.57 - <javac destdir="${build.b}" srcdir="test" failonerror="false">
35.58 +
35.59 +
35.60 + <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
35.61 + <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
35.62 <classpath>
35.63 <pathelement location="${apiB}"/>
35.64 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
35.65 + <pathelement location="${junit.jar}"/>
35.66 </classpath>
35.67 </javac>
35.68
36.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
36.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
36.3 @@ -54,6 +54,9 @@
36.4 <source-file>
36.5 <location>${ant.script}</location>
36.6 </source-file>
36.7 + <source-file>
36.8 + <location>project.properties</location>
36.9 + </source-file>
36.10 </items>
36.11 <context-menu>
36.12 <ide-action name="build"/>
36.13 @@ -68,7 +71,7 @@
36.14 <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
36.15 <compilation-unit>
36.16 <package-root>test</package-root>
36.17 - <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
36.18 + <classpath mode="compile">${apiA}:${junit.jar}</classpath>
36.19 <built-to>build/tests</built-to>
36.20 <source-level>1.5</source-level>
36.21 </compilation-unit>
37.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/project.properties Sat Jun 14 09:52:48 2008 +0200
37.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/project.properties Sat Jun 14 09:52:49 2008 +0200
37.3 @@ -1,6 +1,8 @@
37.4
37.5 # location to root of the repository with apifest projects
37.6 apifest=../../..
37.7 +# and where is junit?
37.8 +junit.jar=../../../../libs/dist/junit-4.4.jar
37.9
37.10 # name of a project to test
37.11 apitotest=subclassingsolution
38.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/test/apifest/CircuitTest.java Sat Jun 14 09:52:48 2008 +0200
38.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/test/apifest/CircuitTest.java Sat Jun 14 09:52:49 2008 +0200
38.3 @@ -46,6 +46,7 @@
38.4
38.5 /** Write a test that works with version from day A and fails with version B.
38.6 */
38.7 +// BEGIN: apifest.day3.against-subclassingsolution.CircuitTest
38.8 public class CircuitTest extends TestCase {
38.9 public CircuitTest(String n) {
38.10 super(n);
38.11 @@ -55,3 +56,4 @@
38.12 Circuit c = Circuit.AND;
38.13 }
38.14 }
38.15 +// END: apifest.day3.against-subclassingsolution.CircuitTest
39.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/build.xml Sat Jun 14 09:52:48 2008 +0200
39.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/build.xml Sat Jun 14 09:52:49 2008 +0200
39.3 @@ -12,10 +12,11 @@
39.4
39.5 <target name="compile" depends="make-sure-projects-are-compiled">
39.6 <mkdir dir="build/tests"/>
39.7 + <echo level="info" message="Compiling the tests against old version of the API"/>
39.8 <javac destdir="build/tests" srcdir="test">
39.9 <classpath>
39.10 <pathelement location="${apiA}"/>
39.11 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
39.12 + <pathelement location="${junit.jar}"/>
39.13 </classpath>
39.14 </javac>
39.15 </target>
39.16 @@ -33,7 +34,9 @@
39.17
39.18 <target name="-run-binary-check" depends="compile">
39.19 <mkdir dir="build/testresultA"/>
39.20 - <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
39.21 +
39.22 + <echo level="info" message="Running the tests against old version of the API"/>
39.23 + <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
39.24 <batchtest todir="build/testresultA">
39.25 <fileset dir="test" includes="**/*.java"/>
39.26 </batchtest>
39.27 @@ -41,13 +44,14 @@
39.28 <formatter type="xml"/>
39.29 <classpath>
39.30 <pathelement location="${apiA}"/>
39.31 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
39.32 + <pathelement location="${junit.jar}"/>
39.33 <pathelement location="build/tests"/>
39.34 </classpath>
39.35 </junit>
39.36
39.37 <mkdir dir="build/testresultB"/>
39.38 - <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
39.39 + <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
39.40 + <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
39.41 <batchtest todir="build/testresultB">
39.42 <fileset dir="test" includes="**/*.java"/>
39.43 </batchtest>
39.44 @@ -55,7 +59,7 @@
39.45 <formatter type="xml"/>
39.46 <classpath>
39.47 <pathelement location="${apiB}"/>
39.48 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
39.49 + <pathelement location="${junit.jar}"/>
39.50 <pathelement location="build/tests"/>
39.51 </classpath>
39.52 </junit>
39.53 @@ -73,10 +77,13 @@
39.54 <property name="build.b" location="build/verifyitbuildsagainstB"/>
39.55 <delete dir="${build.b}"/>
39.56 <mkdir dir="${build.b}"/>
39.57 - <javac destdir="${build.b}" srcdir="test" failonerror="false">
39.58 +
39.59 +
39.60 + <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
39.61 + <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
39.62 <classpath>
39.63 <pathelement location="${apiB}"/>
39.64 - <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
39.65 + <pathelement location="${junit.jar}"/>
39.66 </classpath>
39.67 </javac>
39.68
40.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/nbproject/project.xml Sat Jun 14 09:52:48 2008 +0200
40.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/nbproject/project.xml Sat Jun 14 09:52:49 2008 +0200
40.3 @@ -4,7 +4,7 @@
40.4 <configuration>
40.5 <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
40.6 <!-- Do not use Project Properties customizer when editing this file manually. -->
40.7 - <name>Against Well Tested Solution</name>
40.8 + <name>Against Subclassing Solution</name>
40.9 <properties>
40.10 <property name="ant.script">build.xml</property>
40.11 <property-file>project.properties</property-file>
40.12 @@ -54,6 +54,9 @@
40.13 <source-file>
40.14 <location>${ant.script}</location>
40.15 </source-file>
40.16 + <source-file>
40.17 + <location>project.properties</location>
40.18 + </source-file>
40.19 </items>
40.20 <context-menu>
40.21 <ide-action name="build"/>
40.22 @@ -68,7 +71,7 @@
40.23 <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
40.24 <compilation-unit>
40.25 <package-root>test</package-root>
40.26 - <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
40.27 + <classpath mode="compile">${apiA}:${junit.jar}</classpath>
40.28 <built-to>build/tests</built-to>
40.29 <source-level>1.5</source-level>
40.30 </compilation-unit>
41.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/project.properties Sat Jun 14 09:52:48 2008 +0200
41.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/project.properties Sat Jun 14 09:52:49 2008 +0200
41.3 @@ -1,6 +1,8 @@
41.4
41.5 # location to root of the repository with apifest projects
41.6 apifest=../../..
41.7 +# and where is junit?
41.8 +junit.jar=../../../../libs/dist/junit-4.4.jar
41.9
41.10 # name of a project to test
41.11 apitotest=welltestedsolution
42.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/test/apifest/CircuitTest.java Sat Jun 14 09:52:48 2008 +0200
42.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/test/apifest/CircuitTest.java Sat Jun 14 09:52:49 2008 +0200
42.3 @@ -46,6 +46,7 @@
42.4
42.5 /** Write a test that works with version from day A and fails with version B.
42.6 */
42.7 +// BEGIN: apifest.day3.against-inputandoperation.CircuitTest
42.8 public class CircuitTest extends TestCase {
42.9 public CircuitTest(String n) {
42.10 super(n);
42.11 @@ -55,10 +56,10 @@
42.12 }
42.13
42.14 // One forgotten final and the dissaster is here.
42.15 - // Of course Circuit has to be public, but it has to be anyway to be usable
42.16 class MyCircuit extends Circuit {
42.17 public double evaluateRealOperation(Operation op) {
42.18 return 0;
42.19 }
42.20 }
42.21 }
42.22 +// END: apifest.day3.against-inputandoperation.CircuitTest