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