samples/aserverinfo/nbproject/build-impl.xml
changeset 292 60bb8519cb2d
parent 90 30a0c70c6579
child 337 d5b6a877e5a8
     1.1 --- a/samples/aserverinfo/nbproject/build-impl.xml	Sat Jun 14 09:53:51 2008 +0200
     1.2 +++ b/samples/aserverinfo/nbproject/build-impl.xml	Sat Nov 15 06:53:43 2008 +0100
     1.3 @@ -19,7 +19,7 @@
     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="aserverinfo-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="aserverinfo-impl">
     1.9      <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    1.10      <!-- 
    1.11                  ======================
    1.12 @@ -218,13 +218,13 @@
    1.13              </sequential>
    1.14          </macrodef>
    1.15      </target>
    1.16 -    <target name="-init-macrodef-nbjpda">
    1.17 +    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
    1.18          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
    1.19              <attribute default="${main.class}" name="name"/>
    1.20              <attribute default="${debug.classpath}" name="classpath"/>
    1.21              <attribute default="" name="stopclassname"/>
    1.22              <sequential>
    1.23 -                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
    1.24 +                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
    1.25                      <classpath>
    1.26                          <path path="@{classpath}"/>
    1.27                      </classpath>
    1.28 @@ -235,7 +235,9 @@
    1.29              <attribute default="${build.classes.dir}" name="dir"/>
    1.30              <sequential>
    1.31                  <nbjpdareload>
    1.32 -                    <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
    1.33 +                    <fileset dir="@{dir}" includes="${fix.classes}">
    1.34 +                        <include name="${fix.includes}*.class"/>
    1.35 +                    </fileset>
    1.36                  </nbjpdareload>
    1.37              </sequential>
    1.38          </macrodef>
    1.39 @@ -253,6 +255,12 @@
    1.40          <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
    1.41              <istrue value="${have-jdk-older-than-1.4}"/>
    1.42          </condition>
    1.43 +        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
    1.44 +            <os family="windows"/>
    1.45 +        </condition>
    1.46 +        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
    1.47 +            <isset property="debug.transport"/>
    1.48 +        </condition>
    1.49      </target>
    1.50      <target depends="-init-debug-args" name="-init-macrodef-debug">
    1.51          <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
    1.52 @@ -262,7 +270,7 @@
    1.53              <sequential>
    1.54                  <java classname="@{classname}" dir="${work.dir}" fork="true">
    1.55                      <jvmarg line="${debug-args-line}"/>
    1.56 -                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
    1.57 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
    1.58                      <jvmarg line="${run.jvmargs}"/>
    1.59                      <classpath>
    1.60                          <path path="@{classpath}"/>
    1.61 @@ -279,12 +287,13 @@
    1.62      <target name="-init-macrodef-java">
    1.63          <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
    1.64              <attribute default="${main.class}" name="classname"/>
    1.65 +            <attribute default="${run.classpath}" name="classpath"/>
    1.66              <element name="customize" optional="true"/>
    1.67              <sequential>
    1.68                  <java classname="@{classname}" dir="${work.dir}" fork="true">
    1.69                      <jvmarg line="${run.jvmargs}"/>
    1.70                      <classpath>
    1.71 -                        <path path="${run.classpath}"/>
    1.72 +                        <path path="@{classpath}"/>
    1.73                      </classpath>
    1.74                      <syspropertyset>
    1.75                          <propertyref prefix="run-sys-prop."/>
    1.76 @@ -309,6 +318,13 @@
    1.77                  ===================
    1.78              -->
    1.79      <target depends="init" name="deps-jar" unless="no.deps"/>
    1.80 +    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
    1.81 +    <target depends="init" name="-check-automatic-build">
    1.82 +        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
    1.83 +    </target>
    1.84 +    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
    1.85 +        <antcall target="clean"/>
    1.86 +    </target>
    1.87      <target depends="init,deps-jar" name="-pre-pre-compile">
    1.88          <mkdir dir="${build.classes.dir}"/>
    1.89      </target>
    1.90 @@ -329,7 +345,7 @@
    1.91          <!-- Empty placeholder for easier customization. -->
    1.92          <!-- You can override this target in the ../build.xml file. -->
    1.93      </target>
    1.94 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
    1.95 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
    1.96      <target name="-pre-compile-single">
    1.97          <!-- Empty placeholder for easier customization. -->
    1.98          <!-- You can override this target in the ../build.xml file. -->
    1.99 @@ -343,7 +359,7 @@
   1.100          <!-- Empty placeholder for easier customization. -->
   1.101          <!-- You can override this target in the ../build.xml file. -->
   1.102      </target>
   1.103 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   1.104 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   1.105      <!--
   1.106                  ====================
   1.107                  JAR BUILDING SECTION
   1.108 @@ -427,6 +443,10 @@
   1.109          <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   1.110          <j2seproject1:java classname="${run.class}"/>
   1.111      </target>
   1.112 +    <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
   1.113 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   1.114 +        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   1.115 +    </target>
   1.116      <!--
   1.117                  =================
   1.118                  DEBUGGING SECTION
   1.119 @@ -435,6 +455,9 @@
   1.120      <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   1.121          <j2seproject1:nbjpdastart name="${debug.class}"/>
   1.122      </target>
   1.123 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
   1.124 +        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
   1.125 +    </target>
   1.126      <target depends="init,compile" name="-debug-start-debuggee">
   1.127          <j2seproject3:debug>
   1.128              <customize>
   1.129 @@ -452,6 +475,11 @@
   1.130          <j2seproject3:debug classname="${debug.class}"/>
   1.131      </target>
   1.132      <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   1.133 +    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   1.134 +        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   1.135 +        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   1.136 +    </target>
   1.137 +    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   1.138      <target depends="init" name="-pre-debug-fix">
   1.139          <fail unless="fix.includes">Must set fix.includes</fail>
   1.140          <property name="javac.includes" value="${fix.includes}.java"/>