samples/sidemeanings/nbproject/build-impl.xml
changeset 340 9c1a298e51a9
parent 263 7e8e995065c5
child 413 f11943a373a7
     1.1 --- a/samples/sidemeanings/nbproject/build-impl.xml	Sat Jun 14 18:51:38 2008 +0200
     1.2 +++ b/samples/sidemeanings/nbproject/build-impl.xml	Mon Dec 21 16:54:12 2009 +0100
     1.3 @@ -20,6 +20,13 @@
     1.4  
     1.5          -->
     1.6  <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="sidemeanings-impl">
     1.7 +    <fail message="Please build using Ant 1.7.1 or higher.">
     1.8 +        <condition>
     1.9 +            <not>
    1.10 +                <antversion atleast="1.7.1"/>
    1.11 +            </not>
    1.12 +        </condition>
    1.13 +    </fail>
    1.14      <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    1.15      <!-- 
    1.16                  ======================
    1.17 @@ -48,21 +55,52 @@
    1.18      </target>
    1.19      <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    1.20          <available file="${manifest.file}" property="manifest.available"/>
    1.21 -        <condition property="manifest.available+main.class">
    1.22 +        <condition property="main.class.available">
    1.23              <and>
    1.24 -                <isset property="manifest.available"/>
    1.25                  <isset property="main.class"/>
    1.26                  <not>
    1.27                      <equals arg1="${main.class}" arg2="" trim="true"/>
    1.28                  </not>
    1.29              </and>
    1.30          </condition>
    1.31 +        <condition property="manifest.available+main.class">
    1.32 +            <and>
    1.33 +                <isset property="manifest.available"/>
    1.34 +                <isset property="main.class.available"/>
    1.35 +            </and>
    1.36 +        </condition>
    1.37 +        <condition property="do.mkdist">
    1.38 +            <and>
    1.39 +                <isset property="libs.CopyLibs.classpath"/>
    1.40 +                <not>
    1.41 +                    <istrue value="${mkdist.disabled}"/>
    1.42 +                </not>
    1.43 +            </and>
    1.44 +        </condition>
    1.45          <condition property="manifest.available+main.class+mkdist.available">
    1.46              <and>
    1.47                  <istrue value="${manifest.available+main.class}"/>
    1.48 -                <isset property="libs.CopyLibs.classpath"/>
    1.49 +                <isset property="do.mkdist"/>
    1.50              </and>
    1.51          </condition>
    1.52 +        <condition property="manifest.available+mkdist.available">
    1.53 +            <and>
    1.54 +                <istrue value="${manifest.available}"/>
    1.55 +                <isset property="do.mkdist"/>
    1.56 +            </and>
    1.57 +        </condition>
    1.58 +        <condition property="manifest.available-mkdist.available">
    1.59 +            <or>
    1.60 +                <istrue value="${manifest.available}"/>
    1.61 +                <isset property="do.mkdist"/>
    1.62 +            </or>
    1.63 +        </condition>
    1.64 +        <condition property="manifest.available+main.class-mkdist.available">
    1.65 +            <or>
    1.66 +                <istrue value="${manifest.available+main.class}"/>
    1.67 +                <isset property="do.mkdist"/>
    1.68 +            </or>
    1.69 +        </condition>
    1.70          <condition property="have.tests">
    1.71              <or>
    1.72                  <available file="${test.src.dir}"/>
    1.73 @@ -97,6 +135,7 @@
    1.74          <property name="javadoc.preview" value="true"/>
    1.75          <property name="application.args" value=""/>
    1.76          <property name="source.encoding" value="${file.encoding}"/>
    1.77 +        <property name="runtime.encoding" value="${source.encoding}"/>
    1.78          <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
    1.79              <and>
    1.80                  <isset property="javadoc.encoding"/>
    1.81 @@ -112,12 +151,11 @@
    1.82          <condition property="do.depend.true">
    1.83              <istrue value="${do.depend}"/>
    1.84          </condition>
    1.85 -        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
    1.86 -            <and>
    1.87 -                <isset property="jaxws.endorsed.dir"/>
    1.88 -                <available file="nbproject/jaxws-build.xml"/>
    1.89 -            </and>
    1.90 +        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
    1.91 +        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
    1.92 +            <length length="0" string="${endorsed.classpath}" when="greater"/>
    1.93          </condition>
    1.94 +        <property name="javac.fork" value="false"/>
    1.95      </target>
    1.96      <target name="-post-init">
    1.97          <!-- Empty placeholder for easier customization. -->
    1.98 @@ -152,14 +190,23 @@
    1.99              <attribute default="${includes}" name="includes"/>
   1.100              <attribute default="${excludes}" name="excludes"/>
   1.101              <attribute default="${javac.debug}" name="debug"/>
   1.102 -            <attribute default="" name="sourcepath"/>
   1.103 +            <attribute default="${empty.dir}" name="sourcepath"/>
   1.104 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   1.105              <element name="customize" optional="true"/>
   1.106              <sequential>
   1.107 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
   1.108 +                <property location="${build.dir}/empty" name="empty.dir"/>
   1.109 +                <mkdir dir="${empty.dir}"/>
   1.110 +                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
   1.111 +                    <src>
   1.112 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   1.113 +                            <include name="*"/>
   1.114 +                        </dirset>
   1.115 +                    </src>
   1.116                      <classpath>
   1.117                          <path path="@{classpath}"/>
   1.118                      </classpath>
   1.119 -                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
   1.120 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.121 +                    <compilerarg line="${javac.compilerargs}"/>
   1.122                      <customize/>
   1.123                  </javac>
   1.124              </sequential>
   1.125 @@ -198,7 +245,7 @@
   1.126              <attribute default="${excludes}" name="excludes"/>
   1.127              <attribute default="**" name="testincludes"/>
   1.128              <sequential>
   1.129 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
   1.130 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
   1.131                      <batchtest todir="${build.test.results.dir}">
   1.132                          <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   1.133                              <filename name="@{testincludes}"/>
   1.134 @@ -213,18 +260,19 @@
   1.135                      </syspropertyset>
   1.136                      <formatter type="brief" usefile="false"/>
   1.137                      <formatter type="xml"/>
   1.138 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.139                      <jvmarg line="${run.jvmargs}"/>
   1.140                  </junit>
   1.141              </sequential>
   1.142          </macrodef>
   1.143      </target>
   1.144 -    <target name="-init-macrodef-nbjpda">
   1.145 +    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   1.146          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.147              <attribute default="${main.class}" name="name"/>
   1.148              <attribute default="${debug.classpath}" name="classpath"/>
   1.149              <attribute default="" name="stopclassname"/>
   1.150              <sequential>
   1.151 -                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
   1.152 +                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
   1.153                      <classpath>
   1.154                          <path path="@{classpath}"/>
   1.155                      </classpath>
   1.156 @@ -255,6 +303,12 @@
   1.157          <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   1.158              <istrue value="${have-jdk-older-than-1.4}"/>
   1.159          </condition>
   1.160 +        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   1.161 +            <os family="windows"/>
   1.162 +        </condition>
   1.163 +        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
   1.164 +            <isset property="debug.transport"/>
   1.165 +        </condition>
   1.166      </target>
   1.167      <target depends="-init-debug-args" name="-init-macrodef-debug">
   1.168          <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.169 @@ -263,8 +317,11 @@
   1.170              <element name="customize" optional="true"/>
   1.171              <sequential>
   1.172                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   1.173 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.174                      <jvmarg line="${debug-args-line}"/>
   1.175 -                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
   1.176 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   1.177 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   1.178 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   1.179                      <jvmarg line="${run.jvmargs}"/>
   1.180                      <classpath>
   1.181                          <path path="@{classpath}"/>
   1.182 @@ -281,12 +338,16 @@
   1.183      <target name="-init-macrodef-java">
   1.184          <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.185              <attribute default="${main.class}" name="classname"/>
   1.186 +            <attribute default="${run.classpath}" name="classpath"/>
   1.187              <element name="customize" optional="true"/>
   1.188              <sequential>
   1.189                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   1.190 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.191 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   1.192 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   1.193                      <jvmarg line="${run.jvmargs}"/>
   1.194                      <classpath>
   1.195 -                        <path path="${run.classpath}"/>
   1.196 +                        <path path="@{classpath}"/>
   1.197                      </classpath>
   1.198                      <syspropertyset>
   1.199                          <propertyref prefix="run-sys-prop."/>
   1.200 @@ -310,7 +371,29 @@
   1.201                  COMPILATION SECTION
   1.202                  ===================
   1.203              -->
   1.204 -    <target depends="init" name="deps-jar" unless="no.deps"/>
   1.205 +    <target name="-deps-jar-init" unless="built-jar.properties">
   1.206 +        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
   1.207 +        <delete file="${built-jar.properties}" quiet="true"/>
   1.208 +    </target>
   1.209 +    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
   1.210 +        <echo level="warn" message="Cycle detected: sidemeanings was already built"/>
   1.211 +    </target>
   1.212 +    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
   1.213 +        <mkdir dir="${build.dir}"/>
   1.214 +        <touch file="${built-jar.properties}" verbose="false"/>
   1.215 +        <property file="${built-jar.properties}" prefix="already.built.jar."/>
   1.216 +        <antcall target="-warn-already-built-jar"/>
   1.217 +        <propertyfile file="${built-jar.properties}">
   1.218 +            <entry key="${basedir}" value=""/>
   1.219 +        </propertyfile>
   1.220 +    </target>
   1.221 +    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
   1.222 +    <target depends="init" name="-check-automatic-build">
   1.223 +        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   1.224 +    </target>
   1.225 +    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
   1.226 +        <antcall target="clean"/>
   1.227 +    </target>
   1.228      <target depends="init,deps-jar" name="-pre-pre-compile">
   1.229          <mkdir dir="${build.classes.dir}"/>
   1.230      </target>
   1.231 @@ -319,10 +402,15 @@
   1.232          <!-- You can override this target in the ../build.xml file. -->
   1.233      </target>
   1.234      <target if="do.depend.true" name="-compile-depend">
   1.235 -        <j2seproject3:depend/>
   1.236 +        <pathconvert property="build.generated.subdirs">
   1.237 +            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   1.238 +                <include name="*"/>
   1.239 +            </dirset>
   1.240 +        </pathconvert>
   1.241 +        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   1.242      </target>
   1.243      <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
   1.244 -        <j2seproject3:javac/>
   1.245 +        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   1.246          <copy todir="${build.classes.dir}">
   1.247              <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   1.248          </copy>
   1.249 @@ -331,7 +419,7 @@
   1.250          <!-- Empty placeholder for easier customization. -->
   1.251          <!-- You can override this target in the ../build.xml file. -->
   1.252      </target>
   1.253 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   1.254 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   1.255      <target name="-pre-compile-single">
   1.256          <!-- Empty placeholder for easier customization. -->
   1.257          <!-- You can override this target in the ../build.xml file. -->
   1.258 @@ -339,13 +427,13 @@
   1.259      <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   1.260          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   1.261          <j2seproject3:force-recompile/>
   1.262 -        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
   1.263 +        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   1.264      </target>
   1.265      <target name="-post-compile-single">
   1.266          <!-- Empty placeholder for easier customization. -->
   1.267          <!-- You can override this target in the ../build.xml file. -->
   1.268      </target>
   1.269 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   1.270 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   1.271      <!--
   1.272                  ====================
   1.273                  JAR BUILDING SECTION
   1.274 @@ -359,10 +447,10 @@
   1.275          <!-- Empty placeholder for easier customization. -->
   1.276          <!-- You can override this target in the ../build.xml file. -->
   1.277      </target>
   1.278 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
   1.279 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
   1.280          <j2seproject1:jar/>
   1.281      </target>
   1.282 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   1.283 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
   1.284          <j2seproject1:jar manifest="${manifest.file}"/>
   1.285      </target>
   1.286      <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   1.287 @@ -405,11 +493,53 @@
   1.288          <property location="${dist.jar}" name="dist.jar.resolved"/>
   1.289          <echo>java -jar "${dist.jar.resolved}"</echo>
   1.290      </target>
   1.291 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
   1.292 +        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   1.293 +        <pathconvert property="run.classpath.without.build.classes.dir">
   1.294 +            <path path="${run.classpath}"/>
   1.295 +            <map from="${build.classes.dir.resolved}" to=""/>
   1.296 +        </pathconvert>
   1.297 +        <pathconvert pathsep=" " property="jar.classpath">
   1.298 +            <path path="${run.classpath.without.build.classes.dir}"/>
   1.299 +            <chainedmapper>
   1.300 +                <flattenmapper/>
   1.301 +                <globmapper from="*" to="lib/*"/>
   1.302 +            </chainedmapper>
   1.303 +        </pathconvert>
   1.304 +        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   1.305 +        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   1.306 +            <fileset dir="${build.classes.dir}"/>
   1.307 +            <manifest>
   1.308 +                <attribute name="Class-Path" value="${jar.classpath}"/>
   1.309 +            </manifest>
   1.310 +        </copylibs>
   1.311 +    </target>
   1.312 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
   1.313 +        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   1.314 +        <pathconvert property="run.classpath.without.build.classes.dir">
   1.315 +            <path path="${run.classpath}"/>
   1.316 +            <map from="${build.classes.dir.resolved}" to=""/>
   1.317 +        </pathconvert>
   1.318 +        <pathconvert pathsep=" " property="jar.classpath">
   1.319 +            <path path="${run.classpath.without.build.classes.dir}"/>
   1.320 +            <chainedmapper>
   1.321 +                <flattenmapper/>
   1.322 +                <globmapper from="*" to="lib/*"/>
   1.323 +            </chainedmapper>
   1.324 +        </pathconvert>
   1.325 +        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   1.326 +        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   1.327 +            <fileset dir="${build.classes.dir}"/>
   1.328 +            <manifest>
   1.329 +                <attribute name="Class-Path" value="${jar.classpath}"/>
   1.330 +            </manifest>
   1.331 +        </copylibs>
   1.332 +    </target>
   1.333      <target name="-post-jar">
   1.334          <!-- Empty placeholder for easier customization. -->
   1.335          <!-- You can override this target in the ../build.xml file. -->
   1.336      </target>
   1.337 -    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
   1.338 +    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
   1.339      <!--
   1.340                  =================
   1.341                  EXECUTION SECTION
   1.342 @@ -425,10 +555,14 @@
   1.343      <target name="-do-not-recompile">
   1.344          <property name="javac.includes.binary" value=""/>
   1.345      </target>
   1.346 -    <target depends="init,-do-not-recompile,compile-single" name="run-single">
   1.347 +    <target depends="init,compile-single" name="run-single">
   1.348          <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   1.349          <j2seproject1:java classname="${run.class}"/>
   1.350      </target>
   1.351 +    <target depends="init,compile-test-single" name="run-test-with-main">
   1.352 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   1.353 +        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   1.354 +    </target>
   1.355      <!--
   1.356                  =================
   1.357                  DEBUGGING SECTION
   1.358 @@ -437,6 +571,9 @@
   1.359      <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   1.360          <j2seproject1:nbjpdastart name="${debug.class}"/>
   1.361      </target>
   1.362 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
   1.363 +        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
   1.364 +    </target>
   1.365      <target depends="init,compile" name="-debug-start-debuggee">
   1.366          <j2seproject3:debug>
   1.367              <customize>
   1.368 @@ -453,7 +590,12 @@
   1.369          <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   1.370          <j2seproject3:debug classname="${debug.class}"/>
   1.371      </target>
   1.372 -    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   1.373 +    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   1.374 +    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   1.375 +        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   1.376 +        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   1.377 +    </target>
   1.378 +    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   1.379      <target depends="init" name="-pre-debug-fix">
   1.380          <fail unless="fix.includes">Must set fix.includes</fail>
   1.381          <property name="javac.includes" value="${fix.includes}.java"/>
   1.382 @@ -476,6 +618,9 @@
   1.383              <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   1.384                  <filename name="**/*.java"/>
   1.385              </fileset>
   1.386 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   1.387 +                <include name="**/*.java"/>
   1.388 +            </fileset>
   1.389          </javadoc>
   1.390      </target>
   1.391      <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
   1.392 @@ -537,7 +682,7 @@
   1.393          <j2seproject3:junit testincludes="**/*Test.java"/>
   1.394      </target>
   1.395      <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
   1.396 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
   1.397 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   1.398      </target>
   1.399      <target depends="init" if="have.tests" name="test-report"/>
   1.400      <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
   1.401 @@ -550,9 +695,9 @@
   1.402          <j2seproject3:junit excludes="" includes="${test.includes}"/>
   1.403      </target>
   1.404      <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
   1.405 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
   1.406 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   1.407      </target>
   1.408 -    <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
   1.409 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
   1.410      <!--
   1.411                  =======================
   1.412                  JUNIT DEBUGGING SECTION
   1.413 @@ -579,7 +724,7 @@
   1.414      <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
   1.415          <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
   1.416      </target>
   1.417 -    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   1.418 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   1.419      <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
   1.420          <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
   1.421      </target>
   1.422 @@ -616,7 +761,22 @@
   1.423                  CLEANUP SECTION
   1.424                  ===============
   1.425              -->
   1.426 -    <target depends="init" name="deps-clean" unless="no.deps"/>
   1.427 +    <target name="-deps-clean-init" unless="built-clean.properties">
   1.428 +        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
   1.429 +        <delete file="${built-clean.properties}" quiet="true"/>
   1.430 +    </target>
   1.431 +    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
   1.432 +        <echo level="warn" message="Cycle detected: sidemeanings was already built"/>
   1.433 +    </target>
   1.434 +    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
   1.435 +        <mkdir dir="${build.dir}"/>
   1.436 +        <touch file="${built-clean.properties}" verbose="false"/>
   1.437 +        <property file="${built-clean.properties}" prefix="already.built.clean."/>
   1.438 +        <antcall target="-warn-already-built-clean"/>
   1.439 +        <propertyfile file="${built-clean.properties}">
   1.440 +            <entry key="${basedir}" value=""/>
   1.441 +        </propertyfile>
   1.442 +    </target>
   1.443      <target depends="init" name="-do-clean">
   1.444          <delete dir="${build.dir}"/>
   1.445          <delete dir="${dist.dir}"/>
   1.446 @@ -626,4 +786,20 @@
   1.447          <!-- You can override this target in the ../build.xml file. -->
   1.448      </target>
   1.449      <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
   1.450 +    <target name="-check-call-dep">
   1.451 +        <property file="${call.built.properties}" prefix="already.built."/>
   1.452 +        <condition property="should.call.dep">
   1.453 +            <not>
   1.454 +                <isset property="already.built.${call.subproject}"/>
   1.455 +            </not>
   1.456 +        </condition>
   1.457 +    </target>
   1.458 +    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
   1.459 +        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
   1.460 +            <propertyset>
   1.461 +                <propertyref prefix="transfer."/>
   1.462 +                <mapper from="transfer.*" to="*" type="glob"/>
   1.463 +            </propertyset>
   1.464 +        </ant>
   1.465 +    </target>
   1.466  </project>