java/SpringDemo1/nbproject/build-impl.xml
changeset 1 9a3fced9634d
parent 0 b8ecf1ac63fb
     1.1 --- a/java/SpringDemo1/nbproject/build-impl.xml	Wed Feb 10 18:25:55 2010 +0100
     1.2 +++ b/java/SpringDemo1/nbproject/build-impl.xml	Wed Feb 10 20:55:08 2010 +0100
     1.3 @@ -1,23 +1,20 @@
     1.4  <?xml version="1.0" encoding="UTF-8"?>
     1.5  <!--
     1.6 -        *** GENERATED FROM project.xml - DO NOT EDIT  ***
     1.7 -        ***         EDIT ../build.xml INSTEAD         ***
     1.8 +*** GENERATED FROM project.xml - DO NOT EDIT  ***
     1.9 +***         EDIT ../build.xml INSTEAD         ***
    1.10  
    1.11 -        For the purpose of easier reading the script
    1.12 -        is divided into following sections:
    1.13 -        - initialization
    1.14 -        - compilation
    1.15 -        - dist
    1.16 -        - execution
    1.17 -        - debugging
    1.18 -        - javadoc
    1.19 -        - junit compilation
    1.20 -        - junit execution
    1.21 -        - junit debugging
    1.22 -        - cleanup
    1.23 +For the purpose of easier reading the script
    1.24 +is divided into following sections:
    1.25  
    1.26 -        -->
    1.27 -<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="SpringDemo1-impl">
    1.28 +  - initialization
    1.29 +  - compilation
    1.30 +  - dist
    1.31 +  - execution
    1.32 +  - debugging
    1.33 +  - cleanup
    1.34 +
    1.35 +-->
    1.36 +<project xmlns:ear2="http://www.netbeans.org/ns/j2ee-earproject/2" basedir=".." default="default" name="SpringDemo1-impl">
    1.37      <import file="ant-deploy.xml"/>
    1.38      <fail message="Please build using Ant 1.7.1 or higher.">
    1.39          <condition>
    1.40 @@ -26,130 +23,81 @@
    1.41              </not>
    1.42          </condition>
    1.43      </fail>
    1.44 -    <target depends="dist,javadoc" description="Build whole project." name="default"/>
    1.45 -    <!--
    1.46 -                INITIALIZATION SECTION
    1.47 -            -->
    1.48 -    <target name="-pre-init">
    1.49 +    <target depends="dist" description="Build whole project." name="default"/>
    1.50 +    <!-- 
    1.51 +    INITIALIZATION SECTION 
    1.52 +    -->
    1.53 +    <target name="pre-init">
    1.54          <!-- Empty placeholder for easier customization. -->
    1.55          <!-- You can override this target in the ../build.xml file. -->
    1.56      </target>
    1.57 -    <target depends="-pre-init" name="-init-private">
    1.58 +    <target depends="pre-init" name="init-private">
    1.59          <property file="nbproject/private/private.properties"/>
    1.60      </target>
    1.61 -    <target depends="-pre-init,-init-private" name="-init-user">
    1.62 +    <target depends="pre-init,init-private" name="init-userdir">
    1.63 +        <property location="${netbeans.user}/build.properties" name="user.properties.file"/>
    1.64 +    </target>
    1.65 +    <target depends="pre-init,init-private,init-userdir" name="init-user">
    1.66          <property file="${user.properties.file}"/>
    1.67 +    </target>
    1.68 +    <target depends="pre-init,init-private,init-userdir,init-user" name="init-project">
    1.69 +        <property file="nbproject/project.properties"/>
    1.70 +    </target>
    1.71 +    <target depends="pre-init,init-private,init-userdir,init-user,init-project" name="do-init">
    1.72          <!-- The two properties below are usually overridden -->
    1.73          <!-- by the active platform. Just a fallback. -->
    1.74          <property name="default.javac.source" value="1.4"/>
    1.75          <property name="default.javac.target" value="1.4"/>
    1.76 -    </target>
    1.77 -    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
    1.78 -        <property file="nbproject/project.properties"/>
    1.79 -    </target>
    1.80 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
    1.81 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    1.82 -        <condition property="have.tests">
    1.83 -            <or>
    1.84 -                <available file="${test.src.dir}"/>
    1.85 -            </or>
    1.86 -        </condition>
    1.87 -        <condition property="have.sources">
    1.88 -            <or>
    1.89 -                <available file="${src.dir}"/>
    1.90 -            </or>
    1.91 -        </condition>
    1.92 -        <condition property="netbeans.home+have.tests">
    1.93 -            <and>
    1.94 -                <isset property="netbeans.home"/>
    1.95 -                <isset property="have.tests"/>
    1.96 -            </and>
    1.97 -        </condition>
    1.98 -        <condition property="no.javadoc.preview">
    1.99 -            <isfalse value="${javadoc.preview}"/>
   1.100 -        </condition>
   1.101 -        <property name="javac.compilerargs" value=""/>
   1.102 -        <condition property="no.deps">
   1.103 -            <and>
   1.104 -                <istrue value="${no.dependencies}"/>
   1.105 -            </and>
   1.106 -        </condition>
   1.107 -        <condition property="no.dist.ear.dir">
   1.108 -            <not>
   1.109 -                <isset property="dist.ear.dir"/>
   1.110 -            </not>
   1.111 -        </condition>
   1.112 -        <property name="build.web.excludes" value="${build.classes.excludes}"/>
   1.113          <condition property="do.compile.jsps">
   1.114              <istrue value="${compile.jsps}"/>
   1.115          </condition>
   1.116 -        <condition property="do.debug.server">
   1.117 -            <or>
   1.118 +        <condition property="do.display.browser">
   1.119 +            <and>
   1.120 +                <istrue value="${display.browser}"/>
   1.121 +                <isset property="client.module.uri"/>
   1.122                  <not>
   1.123 -                    <isset property="debug.server"/>
   1.124 -                </not>
   1.125 -                <istrue value="${debug.server}"/>
   1.126 -                <and>
   1.127 -                    <not>
   1.128 -                        <istrue value="${debug.server}"/>
   1.129 -                    </not>
   1.130 -                    <not>
   1.131 -                        <istrue value="${debug.client}"/>
   1.132 -                    </not>
   1.133 -                </and>
   1.134 -            </or>
   1.135 -        </condition>
   1.136 -        <condition property="do.debug.client">
   1.137 -            <istrue value="${debug.client}"/>
   1.138 -        </condition>
   1.139 -        <condition property="do.display.browser">
   1.140 -            <istrue value="${display.browser}"/>
   1.141 -        </condition>
   1.142 -        <condition property="do.display.browser.debug">
   1.143 -            <and>
   1.144 -                <isset property="do.display.browser"/>
   1.145 -                <not>
   1.146 -                    <isset property="do.debug.client"/>
   1.147 +                    <isset property="app.client"/>
   1.148                  </not>
   1.149              </and>
   1.150          </condition>
   1.151 -        <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
   1.152 -        <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
   1.153 -        <condition property="do.war.package.with.custom.manifest">
   1.154 -            <isset property="has.custom.manifest"/>
   1.155 -        </condition>
   1.156 -        <condition property="do.war.package.without.custom.manifest">
   1.157 -            <not>
   1.158 -                <isset property="has.custom.manifest"/>
   1.159 -            </not>
   1.160 -        </condition>
   1.161 -        <condition property="do.tmp.war.package.with.custom.manifest">
   1.162 +        <available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
   1.163 +        <!--
   1.164 +                    Variables needed to support directory deployment.
   1.165 +                -->
   1.166 +        <condition property="do.package.with.custom.manifest.not.directory.deploy">
   1.167              <and>
   1.168                  <isset property="has.custom.manifest"/>
   1.169 -                <or>
   1.170 -                    <isfalse value="${directory.deployment.supported}"/>
   1.171 -                    <isset property="dist.ear.dir"/>
   1.172 -                </or>
   1.173 +                <isfalse value="${directory.deployment.supported}"/>
   1.174              </and>
   1.175          </condition>
   1.176 -        <condition property="do.tmp.war.package.without.custom.manifest">
   1.177 +        <condition property="do.package.without.custom.manifest.not.directory.deploy">
   1.178              <and>
   1.179                  <not>
   1.180                      <isset property="has.custom.manifest"/>
   1.181                  </not>
   1.182 -                <or>
   1.183 -                    <isfalse value="${directory.deployment.supported}"/>
   1.184 -                    <isset property="dist.ear.dir"/>
   1.185 -                </or>
   1.186 +                <isfalse value="${directory.deployment.supported}"/>
   1.187              </and>
   1.188          </condition>
   1.189 -        <condition property="do.tmp.war.package">
   1.190 -            <or>
   1.191 -                <isfalse value="${directory.deployment.supported}"/>
   1.192 -                <isset property="dist.ear.dir"/>
   1.193 -            </or>
   1.194 +        <condition property="do.package.not.directory.deploy">
   1.195 +            <isfalse value="${directory.deployment.supported}"/>
   1.196          </condition>
   1.197 -        <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
   1.198 +        <!--End Variables needed to support directory deployment.-->
   1.199 +        <condition else="" property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}">
   1.200 +            <and>
   1.201 +                <isset property="main.class"/>
   1.202 +                <not>
   1.203 +                    <equals arg1="${main.class}" arg2="" trim="true"/>
   1.204 +                </not>
   1.205 +            </and>
   1.206 +        </condition>
   1.207 +        <condition else="" property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}">
   1.208 +            <and>
   1.209 +                <isset property="j2ee.appclient.jvmoptions"/>
   1.210 +                <not>
   1.211 +                    <equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
   1.212 +                </not>
   1.213 +            </and>
   1.214 +        </condition>
   1.215          <condition else="" property="application.args.param" value="${application.args}">
   1.216              <and>
   1.217                  <isset property="application.args"/>
   1.218 @@ -158,220 +106,32 @@
   1.219                  </not>
   1.220              </and>
   1.221          </condition>
   1.222 -        <property name="source.encoding" value="${file.encoding}"/>
   1.223 -        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   1.224 +        <condition property="can.debug.appclient">
   1.225              <and>
   1.226 -                <isset property="javadoc.encoding"/>
   1.227 -                <not>
   1.228 -                    <equals arg1="${javadoc.encoding}" arg2=""/>
   1.229 -                </not>
   1.230 +                <isset property="netbeans.home"/>
   1.231 +                <isset property="app.client"/>
   1.232              </and>
   1.233          </condition>
   1.234 -        <property name="javadoc.encoding.used" value="${source.encoding}"/>
   1.235 -        <property name="includes" value="**"/>
   1.236 -        <property name="excludes" value=""/>
   1.237 -        <property name="runmain.jvmargs" value=""/>
   1.238          <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   1.239          <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   1.240              <length length="0" string="${endorsed.classpath}" when="greater"/>
   1.241          </condition>
   1.242      </target>
   1.243 -    <target depends="init" name="-init-cos" unless="deploy.on.save">
   1.244 -        <condition property="deploy.on.save" value="true">
   1.245 +    <target depends="init" name="-init-cos">
   1.246 +        <condition else="false" property="build.deploy.on.save">
   1.247              <istrue value="${j2ee.deploy.on.save}"/>
   1.248          </condition>
   1.249      </target>
   1.250 -    <target name="-post-init">
   1.251 +    <target name="post-init">
   1.252          <!-- Empty placeholder for easier customization. -->
   1.253          <!-- You can override this target in the ../build.xml file. -->
   1.254      </target>
   1.255 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
   1.256 -        <fail unless="src.dir">Must set src.dir</fail>
   1.257 -        <fail unless="test.src.dir">Must set test.src.dir</fail>
   1.258 +    <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init" name="init-check">
   1.259          <fail unless="build.dir">Must set build.dir</fail>
   1.260 -        <fail unless="build.web.dir">Must set build.web.dir</fail>
   1.261          <fail unless="build.generated.dir">Must set build.generated.dir</fail>
   1.262          <fail unless="dist.dir">Must set dist.dir</fail>
   1.263 -        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
   1.264 -        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
   1.265 -        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
   1.266 -        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
   1.267          <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   1.268 -        <fail unless="dist.war">Must set dist.war</fail>
   1.269 -        <fail unless="j2ee.platform.classpath">
   1.270 -The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
   1.271 -Either open the project in the IDE and assign the server or setup the server classpath manually.
   1.272 -For example like this:
   1.273 -   ant -Duser.properties.file=&lt;path_to_property_file&gt; (where you put the property "j2ee.platform.classpath" in a .properties file)
   1.274 -or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties file is used)
   1.275 -                </fail>
   1.276 -    </target>
   1.277 -    <target name="-init-macrodef-property">
   1.278 -        <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
   1.279 -            <attribute name="name"/>
   1.280 -            <attribute name="value"/>
   1.281 -            <sequential>
   1.282 -                <property name="@{name}" value="${@{value}}"/>
   1.283 -            </sequential>
   1.284 -        </macrodef>
   1.285 -    </target>
   1.286 -    <target name="-init-macrodef-javac">
   1.287 -        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
   1.288 -            <attribute default="${src.dir}" name="srcdir"/>
   1.289 -            <attribute default="${build.classes.dir}" name="destdir"/>
   1.290 -            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
   1.291 -            <attribute default="${includes}" name="includes"/>
   1.292 -            <attribute default="${excludes}" name="excludes"/>
   1.293 -            <attribute default="${javac.debug}" name="debug"/>
   1.294 -            <attribute default="${empty.dir}" name="gensrcdir"/>
   1.295 -            <element name="customize" optional="true"/>
   1.296 -            <sequential>
   1.297 -                <property location="${build.dir}/empty" name="empty.dir"/>
   1.298 -                <mkdir dir="${empty.dir}"/>
   1.299 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
   1.300 -                    <src>
   1.301 -                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   1.302 -                            <include name="*"/>
   1.303 -                        </dirset>
   1.304 -                    </src>
   1.305 -                    <classpath>
   1.306 -                        <path path="@{classpath}"/>
   1.307 -                    </classpath>
   1.308 -                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.309 -                    <compilerarg line="${javac.compilerargs}"/>
   1.310 -                    <customize/>
   1.311 -                </javac>
   1.312 -            </sequential>
   1.313 -        </macrodef>
   1.314 -    </target>
   1.315 -    <target name="-init-macrodef-junit">
   1.316 -        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
   1.317 -            <attribute default="${includes}" name="includes"/>
   1.318 -            <attribute default="${excludes}" name="excludes"/>
   1.319 -            <attribute default="**" name="testincludes"/>
   1.320 -            <sequential>
   1.321 -                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
   1.322 -                    <batchtest todir="${build.test.results.dir}">
   1.323 -                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   1.324 -                            <filename name="@{testincludes}"/>
   1.325 -                        </fileset>
   1.326 -                    </batchtest>
   1.327 -                    <classpath>
   1.328 -                        <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
   1.329 -                    </classpath>
   1.330 -                    <syspropertyset>
   1.331 -                        <propertyref prefix="test-sys-prop."/>
   1.332 -                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.333 -                    </syspropertyset>
   1.334 -                    <formatter type="brief" usefile="false"/>
   1.335 -                    <formatter type="xml"/>
   1.336 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.337 -                    <jvmarg line="${runmain.jvmargs}"/>
   1.338 -                </junit>
   1.339 -            </sequential>
   1.340 -        </macrodef>
   1.341 -    </target>
   1.342 -    <target name="-init-macrodef-java">
   1.343 -        <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
   1.344 -            <attribute default="${main.class}" name="classname"/>
   1.345 -            <attribute default="${debug.classpath}" name="classpath"/>
   1.346 -            <element name="customize" optional="true"/>
   1.347 -            <sequential>
   1.348 -                <java classname="@{classname}" fork="true">
   1.349 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.350 -                    <jvmarg line="${runmain.jvmargs}"/>
   1.351 -                    <classpath>
   1.352 -                        <path path="@{classpath}:${j2ee.platform.classpath}"/>
   1.353 -                    </classpath>
   1.354 -                    <syspropertyset>
   1.355 -                        <propertyref prefix="run-sys-prop."/>
   1.356 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   1.357 -                    </syspropertyset>
   1.358 -                    <customize/>
   1.359 -                </java>
   1.360 -            </sequential>
   1.361 -        </macrodef>
   1.362 -    </target>
   1.363 -    <target name="-init-macrodef-nbjsdebug">
   1.364 -        <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
   1.365 -            <attribute default="${client.url}" name="webUrl"/>
   1.366 -            <sequential>
   1.367 -                <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
   1.368 -            </sequential>
   1.369 -        </macrodef>
   1.370 -    </target>
   1.371 -    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   1.372 -        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
   1.373 -            <attribute default="${main.class}" name="name"/>
   1.374 -            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
   1.375 -            <sequential>
   1.376 -                <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
   1.377 -                    <classpath>
   1.378 -                        <path path="@{classpath}"/>
   1.379 -                    </classpath>
   1.380 -                </nbjpdastart>
   1.381 -            </sequential>
   1.382 -        </macrodef>
   1.383 -        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
   1.384 -            <attribute default="${build.classes.dir}" name="dir"/>
   1.385 -            <sequential>
   1.386 -                <nbjpdareload>
   1.387 -                    <fileset dir="@{dir}" includes="${fix.classes}">
   1.388 -                        <include name="${fix.includes}*.class"/>
   1.389 -                    </fileset>
   1.390 -                </nbjpdareload>
   1.391 -            </sequential>
   1.392 -        </macrodef>
   1.393 -        <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
   1.394 -            <sequential>
   1.395 -                <nbjpdaappreloaded/>
   1.396 -            </sequential>
   1.397 -        </macrodef>
   1.398 -    </target>
   1.399 -    <target name="-init-debug-args">
   1.400 -        <property name="version-output" value="java version &quot;${ant.java.version}"/>
   1.401 -        <condition property="have-jdk-older-than-1.4">
   1.402 -            <or>
   1.403 -                <contains string="${version-output}" substring="java version &quot;1.0"/>
   1.404 -                <contains string="${version-output}" substring="java version &quot;1.1"/>
   1.405 -                <contains string="${version-output}" substring="java version &quot;1.2"/>
   1.406 -                <contains string="${version-output}" substring="java version &quot;1.3"/>
   1.407 -            </or>
   1.408 -        </condition>
   1.409 -        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   1.410 -            <istrue value="${have-jdk-older-than-1.4}"/>
   1.411 -        </condition>
   1.412 -        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   1.413 -            <os family="windows"/>
   1.414 -        </condition>
   1.415 -        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
   1.416 -            <isset property="debug.transport"/>
   1.417 -        </condition>
   1.418 -    </target>
   1.419 -    <target depends="-init-debug-args" name="-init-macrodef-debug">
   1.420 -        <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
   1.421 -            <attribute default="${main.class}" name="classname"/>
   1.422 -            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
   1.423 -            <attribute default="${application.args.param}" name="args"/>
   1.424 -            <element name="customize" optional="true"/>
   1.425 -            <sequential>
   1.426 -                <java classname="@{classname}" fork="true">
   1.427 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.428 -                    <jvmarg line="${debug-args-line}"/>
   1.429 -                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   1.430 -                    <jvmarg line="${runmain.jvmargs}"/>
   1.431 -                    <classpath>
   1.432 -                        <path path="@{classpath}"/>
   1.433 -                    </classpath>
   1.434 -                    <syspropertyset>
   1.435 -                        <propertyref prefix="run-sys-prop."/>
   1.436 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   1.437 -                    </syspropertyset>
   1.438 -                    <arg line="@{args}"/>
   1.439 -                    <customize/>
   1.440 -                </java>
   1.441 -            </sequential>
   1.442 -        </macrodef>
   1.443 +        <fail unless="dist.jar">Must set dist.jar</fail>
   1.444      </target>
   1.445      <target name="-init-taskdefs">
   1.446          <fail unless="libs.CopyLibs.classpath">
   1.447 @@ -386,179 +146,107 @@
   1.448                  </fail>
   1.449          <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
   1.450      </target>
   1.451 -    <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-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs" name="init"/>
   1.452 +    <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs" name="init"/>
   1.453      <!--
   1.454 -                COMPILATION SECTION
   1.455 -            -->
   1.456 -    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
   1.457 -    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
   1.458 -    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
   1.459 -    <target depends="init,deps-jar" name="-pre-pre-compile">
   1.460 -        <mkdir dir="${build.classes.dir}"/>
   1.461 +    COMPILATION SECTION
   1.462 +    -->
   1.463 +    <target depends="init" name="deps-jar" unless="no.deps"/>
   1.464 +    <target depends="init" name="deps-j2ee-archive" unless="no.deps">
   1.465 +        <condition property="build.deploy.on.save" value="false">
   1.466 +            <not>
   1.467 +                <isset property="build.deploy.on.save"/>
   1.468 +            </not>
   1.469 +        </condition>
   1.470 +        <ant antfile="${project.SpringDemo1-ejb}/build.xml" inheritall="false" target="dist-ear">
   1.471 +            <property location="${build.dir}" name="dist.ear.dir"/>
   1.472 +            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
   1.473 +        </ant>
   1.474 +        <condition property="build.deploy.on.save" value="false">
   1.475 +            <not>
   1.476 +                <isset property="build.deploy.on.save"/>
   1.477 +            </not>
   1.478 +        </condition>
   1.479 +        <ant antfile="${project.SpringDemo1-war}/build.xml" inheritall="false" target="dist-ear">
   1.480 +            <property location="${build.dir}" name="dist.ear.dir"/>
   1.481 +            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
   1.482 +        </ant>
   1.483      </target>
   1.484 -    <target name="-pre-compile">
   1.485 +    <target depends="init,deps-jar,deps-j2ee-archive" name="pre-pre-compile"/>
   1.486 +    <target name="pre-compile">
   1.487          <!-- Empty placeholder for easier customization. -->
   1.488          <!-- You can override this target in the ../build.xml file. -->
   1.489      </target>
   1.490 -    <target name="-copy-webdir">
   1.491 -        <copy todir="${build.web.dir}">
   1.492 -            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
   1.493 -        </copy>
   1.494 -        <copy todir="${build.web.dir}/WEB-INF">
   1.495 -            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
   1.496 +    <target depends="init,deps-jar,pre-pre-compile,pre-compile,-do-compile-deps" name="do-compile">
   1.497 +        <copy todir="${build.dir}/META-INF">
   1.498 +            <fileset dir="${meta.inf}"/>
   1.499          </copy>
   1.500      </target>
   1.501 -    <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile">
   1.502 -        <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
   1.503 -        <copy todir="${build.classes.dir}">
   1.504 -            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   1.505 -        </copy>
   1.506 +    <target depends="init,deps-jar,pre-pre-compile,pre-compile" name="-do-compile-deps">
   1.507 +        <copyfiles files="${reference.SpringDemo1-war.dist-ear}" todir="${build.dir}//"/>
   1.508 +        <copyfiles files="${reference.SpringDemo1-ejb.dist-ear}" todir="${build.dir}//"/>
   1.509      </target>
   1.510 -    <target if="has.custom.manifest" name="-copy-manifest">
   1.511 -        <mkdir dir="${build.meta.inf.dir}"/>
   1.512 -        <copy todir="${build.meta.inf.dir}">
   1.513 -            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
   1.514 -        </copy>
   1.515 -    </target>
   1.516 -    <target if="has.persistence.xml" name="-copy-persistence-xml">
   1.517 -        <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
   1.518 -        <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
   1.519 -            <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
   1.520 -        </copy>
   1.521 -    </target>
   1.522 -    <target name="-post-compile">
   1.523 +    <target name="post-compile">
   1.524          <!-- Empty placeholder for easier customization. -->
   1.525          <!-- You can override this target in the ../build.xml file. -->
   1.526      </target>
   1.527 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   1.528 -    <target name="-pre-compile-single">
   1.529 +    <target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
   1.530 +    <!--
   1.531 +                DIST BUILDING SECTION
   1.532 +            -->
   1.533 +    <target name="pre-dist">
   1.534          <!-- Empty placeholder for easier customization. -->
   1.535          <!-- You can override this target in the ../build.xml file. -->
   1.536      </target>
   1.537 -    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   1.538 -        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   1.539 -        <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
   1.540 -        <copy todir="${build.classes.dir}">
   1.541 -            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   1.542 -        </copy>
   1.543 +    <target depends="init,compile,pre-dist" name="do-dist-without-manifest" unless="has.custom.manifest">
   1.544 +        <dirname file="${dist.jar}" property="dist.jar.dir"/>
   1.545 +        <mkdir dir="${dist.jar.dir}"/>
   1.546 +        <jar compress="${jar.compress}" jarfile="${dist.jar}">
   1.547 +            <fileset dir="${build.dir}"/>
   1.548 +        </jar>
   1.549      </target>
   1.550 -    <target name="-post-compile-single">
   1.551 +    <target depends="init,compile,pre-dist" if="has.custom.manifest" name="do-dist-with-manifest">
   1.552 +        <dirname file="${dist.jar}" property="dist.jar.dir"/>
   1.553 +        <mkdir dir="${dist.jar.dir}"/>
   1.554 +        <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
   1.555 +            <fileset dir="${build.dir}"/>
   1.556 +        </jar>
   1.557 +    </target>
   1.558 +    <!--
   1.559 +                TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
   1.560 +            -->
   1.561 +    <target depends="init,compile,pre-dist" if="do.package.without.custom.manifest.not.directory.deploy" name="-do-tmp-dist-without-manifest">
   1.562 +        <dirname file="${dist.jar}" property="dist.jar.dir"/>
   1.563 +        <mkdir dir="${dist.jar.dir}"/>
   1.564 +        <jar compress="${jar.compress}" jarfile="${dist.jar}">
   1.565 +            <fileset dir="${build.dir}"/>
   1.566 +        </jar>
   1.567 +    </target>
   1.568 +    <target depends="init,compile,pre-dist" if="do.package.with.custom.manifest.not.directory.deploy" name="-do-tmp-dist-with-manifest">
   1.569 +        <dirname file="${dist.jar}" property="dist.jar.dir"/>
   1.570 +        <mkdir dir="${dist.jar.dir}"/>
   1.571 +        <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
   1.572 +            <fileset dir="${build.dir}"/>
   1.573 +        </jar>
   1.574 +    </target>
   1.575 +    <target depends="init,compile,pre-dist,-do-tmp-dist-without-manifest,-do-tmp-dist-with-manifest" name="-do-dist-directory-deploy"/>
   1.576 +    <target depends="init,compile,pre-dist,-do-dist-directory-deploy,post-dist" description="Build distribution (JAR) - if directory deployment is not supported." name="dist-directory-deploy"/>
   1.577 +    <!--
   1.578 +                END TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
   1.579 +            -->
   1.580 +    <target name="post-dist">
   1.581          <!-- Empty placeholder for easier customization. -->
   1.582          <!-- You can override this target in the ../build.xml file. -->
   1.583      </target>
   1.584 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   1.585 -    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
   1.586 -        <mkdir dir="${build.generated.dir}/src"/>
   1.587 -        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
   1.588 -            <arg value="-uriroot"/>
   1.589 -            <arg file="${basedir}/${build.web.dir}"/>
   1.590 -            <arg value="-d"/>
   1.591 -            <arg file="${basedir}/${build.generated.dir}/src"/>
   1.592 -            <arg value="-die1"/>
   1.593 -            <arg value="-compilerSourceVM ${javac.source}"/>
   1.594 -            <arg value="-compilerTargetVM ${javac.target}"/>
   1.595 -            <arg value="-javaEncoding ${source.encoding}"/>
   1.596 -            <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
   1.597 -        </java>
   1.598 -        <mkdir dir="${build.generated.dir}/classes"/>
   1.599 -        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
   1.600 -    </target>
   1.601 -    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
   1.602 -        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
   1.603 -        <mkdir dir="${build.generated.dir}/src"/>
   1.604 -        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
   1.605 -            <arg value="-uriroot"/>
   1.606 -            <arg file="${basedir}/${build.web.dir}"/>
   1.607 -            <arg value="-d"/>
   1.608 -            <arg file="${basedir}/${build.generated.dir}/src"/>
   1.609 -            <arg value="-die1"/>
   1.610 -            <arg value="-jspc.files"/>
   1.611 -            <arg path="${jsp.includes}"/>
   1.612 -            <arg value="-compilerSourceVM ${javac.source}"/>
   1.613 -            <arg value="-compilerTargetVM ${javac.target}"/>
   1.614 -            <arg value="-javaEncoding ${source.encoding}"/>
   1.615 -            <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
   1.616 -        </java>
   1.617 -        <mkdir dir="${build.generated.dir}/classes"/>
   1.618 -        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
   1.619 -            <customize>
   1.620 -                <patternset includes="${javac.jsp.includes}"/>
   1.621 -            </customize>
   1.622 -        </webproject2:javac>
   1.623 -    </target>
   1.624 -    <target name="compile-single-jsp">
   1.625 -        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
   1.626 -        <antcall target="-do-compile-single-jsp"/>
   1.627 -    </target>
   1.628 +    <target depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)." name="dist"/>
   1.629      <!--
   1.630 -                DIST BUILDING SECTION
   1.631 -            -->
   1.632 -    <target name="-pre-dist">
   1.633 +    EXECUTION SECTION
   1.634 +    -->
   1.635 +    <target depends="run-deploy,run-display-browser,run-ac" description="Deploy to server." name="run"/>
   1.636 +    <target name="pre-run-deploy">
   1.637          <!-- Empty placeholder for easier customization. -->
   1.638          <!-- You can override this target in the ../build.xml file. -->
   1.639      </target>
   1.640 -    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
   1.641 -        <dirname file="${dist.war}" property="dist.jar.dir"/>
   1.642 -        <mkdir dir="${dist.jar.dir}"/>
   1.643 -        <jar compress="${jar.compress}" jarfile="${dist.war}">
   1.644 -            <fileset dir="${build.web.dir}"/>
   1.645 -        </jar>
   1.646 -    </target>
   1.647 -    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
   1.648 -        <dirname file="${dist.war}" property="dist.jar.dir"/>
   1.649 -        <mkdir dir="${dist.jar.dir}"/>
   1.650 -        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
   1.651 -            <fileset dir="${build.web.dir}"/>
   1.652 -        </jar>
   1.653 -    </target>
   1.654 -    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
   1.655 -        <dirname file="${dist.war}" property="dist.jar.dir"/>
   1.656 -        <mkdir dir="${dist.jar.dir}"/>
   1.657 -        <jar compress="${jar.compress}" jarfile="${dist.war}">
   1.658 -            <fileset dir="${build.web.dir}"/>
   1.659 -        </jar>
   1.660 -    </target>
   1.661 -    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
   1.662 -        <dirname file="${dist.war}" property="dist.jar.dir"/>
   1.663 -        <mkdir dir="${dist.jar.dir}"/>
   1.664 -        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
   1.665 -            <fileset dir="${build.web.dir}"/>
   1.666 -        </jar>
   1.667 -    </target>
   1.668 -    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
   1.669 -    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
   1.670 -        <copyfiles files="${libs.spring-framework.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
   1.671 -        <mkdir dir="${build.web.dir}/META-INF"/>
   1.672 -        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
   1.673 -    </target>
   1.674 -    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
   1.675 -        <copyfiles files="${libs.spring-framework.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
   1.676 -    </target>
   1.677 -    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
   1.678 -        <delete dir="${build.web.dir}/WEB-INF/lib"/>
   1.679 -    </target>
   1.680 -    <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
   1.681 -        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
   1.682 -        <mkdir dir="${dist.jar.dir}"/>
   1.683 -        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
   1.684 -            <fileset dir="${build.web.dir}"/>
   1.685 -        </jar>
   1.686 -    </target>
   1.687 -    <target name="-post-dist">
   1.688 -        <!-- Empty placeholder for easier customization. -->
   1.689 -        <!-- You can override this target in the ../build.xml file. -->
   1.690 -    </target>
   1.691 -    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
   1.692 -    <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
   1.693 -    <!--
   1.694 -                EXECUTION SECTION
   1.695 -            -->
   1.696 -    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
   1.697 -    <target name="-pre-run-deploy">
   1.698 -        <!-- Empty placeholder for easier customization. -->
   1.699 -        <!-- You can override this target in the ../build.xml file. -->
   1.700 -    </target>
   1.701 -    <target name="-post-run-deploy">
   1.702 +    <target name="post-run-deploy">
   1.703          <!-- Empty placeholder for easier customization. -->
   1.704          <!-- You can override this target in the ../build.xml file. -->
   1.705      </target>
   1.706 @@ -570,18 +258,17 @@
   1.707          <!-- Empty placeholder for easier customization. -->
   1.708          <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
   1.709      </target>
   1.710 -    <target name="-run-deploy-am">
   1.711 +    <target name="-run-deploy-am" unless="no.deps">
   1.712          <!-- Task to deploy to the Access Manager runtime. -->
   1.713 +        <ant antfile="${project.SpringDemo1-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
   1.714 +        <ant antfile="${project.SpringDemo1-war}/build.xml" inheritall="false" target="-run-deploy-am"/>
   1.715      </target>
   1.716 -    <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy" name="run-deploy">
   1.717 -        <nbjpdaappreloaded/>
   1.718 -    </target>
   1.719 +    <target depends="-init-cos,dist-directory-deploy,pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,post-run-deploy" name="run-deploy"/>
   1.720      <target if="netbeans.home" name="-run-deploy-nb">
   1.721 -        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
   1.722 +        <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
   1.723      </target>
   1.724      <target name="-init-deploy-ant" unless="netbeans.home">
   1.725 -        <property name="deploy.ant.archive" value="${dist.war}"/>
   1.726 -        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
   1.727 +        <property name="deploy.ant.archive" value="${dist.jar}"/>
   1.728          <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
   1.729          <property name="deploy.ant.enabled" value="true"/>
   1.730      </target>
   1.731 @@ -589,8 +276,8 @@
   1.732      <target if="netbeans.home" name="-run-undeploy-nb">
   1.733          <fail message="Undeploy is not supported from within the IDE"/>
   1.734      </target>
   1.735 -    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
   1.736 -        <nbverify file="${dist.war}"/>
   1.737 +    <target depends="dist" name="verify">
   1.738 +        <nbverify file="${dist.jar}"/>
   1.739      </target>
   1.740      <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
   1.741      <target if="do.display.browser" name="-init-display-browser">
   1.742 @@ -598,7 +285,10 @@
   1.743              <isset property="netbeans.home"/>
   1.744          </condition>
   1.745          <condition property="do.display.browser.cl">
   1.746 -            <isset property="deploy.ant.enabled"/>
   1.747 +            <and>
   1.748 +                <isset property="deploy.ant.enabled"/>
   1.749 +                <isset property="deploy.ant.client.url"/>
   1.750 +            </and>
   1.751          </condition>
   1.752      </target>
   1.753      <target if="do.display.browser.nb" name="-display-browser-nb">
   1.754 @@ -645,214 +335,142 @@
   1.755      </target>
   1.756      <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
   1.757          <fail unless="browser">
   1.758 -                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
   1.759 -                </fail>
   1.760 +            Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
   1.761 +        </fail>
   1.762          <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
   1.763          <echo>Launching ${browse.url}</echo>
   1.764          <exec executable="${browser}" spawn="true">
   1.765              <arg line="${browser.args} ${browse.url}"/>
   1.766          </exec>
   1.767      </target>
   1.768 -    <target depends="init,-init-cos,compile-single" name="run-main">
   1.769 -        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   1.770 -        <webproject1:java classname="${run.class}"/>
   1.771 +    <target depends="init" if="app.client" name="run-ac">
   1.772 +        <antcall target="run-${app.client}"/>
   1.773      </target>
   1.774 -    <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
   1.775 -        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   1.776 -        <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   1.777 +    <target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
   1.778 +        <property name="client.jar" value="${dist.dir}/SpringDemo1Client.jar"/>
   1.779 +        <sleep seconds="3"/>
   1.780 +        <copy failonerror="false" file="${wa.copy.client.jar.from}/SpringDemo1/SpringDemo1Client.jar" todir="${dist.dir}"/>
   1.781 +        <copy failonerror="false" flatten="true" todir="${dist.dir}/">
   1.782 +            <fileset dir="${wa.copy.client.jar.from}/SpringDemo1" includes="**/SpringDemo1Client.jar"/>
   1.783 +        </copy>
   1.784 +        <copy flatten="true" todir="${dist.dir}/SpringDemo1Client">
   1.785 +            <fileset dir="${wa.copy.client.jar.from}/SpringDemo1" includes="**/*.*ar"/>
   1.786 +        </copy>
   1.787 +        <copy failonerror="false" flatten="false" todir="${dist.dir}/SpringDemo1Client">
   1.788 +            <fileset dir="${dist.dir}/gfdeploy/SpringDemo1" includes="**/*.jar"/>
   1.789 +        </copy>
   1.790      </target>
   1.791      <!--
   1.792 -                DEBUGGING SECTION
   1.793 -            -->
   1.794 -    <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
   1.795 -        <nbstartserver debugmode="true"/>
   1.796 +    DEBUGGING SECTION
   1.797 +    -->
   1.798 +    <target depends="run-debug,run-debug-appclient" description="Deploy to server." name="debug"/>
   1.799 +    <target depends="dist" description="Debug project in IDE." if="netbeans.home" name="run-debug" unless="app.client">
   1.800 +        <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
   1.801          <antcall target="connect-debugger"/>
   1.802 -        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
   1.803          <antcall target="debug-display-browser"/>
   1.804 -        <antcall target="connect-client-debugger"/>
   1.805      </target>
   1.806 -    <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
   1.807 +    <target name="connect-debugger" unless="is.debugged">
   1.808          <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
   1.809              <classpath>
   1.810 -                <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
   1.811 +                <path path="${debug.classpath}"/>
   1.812 +                <fileset dir="${build.dir}/lib" includes="*.jar"/>
   1.813              </classpath>
   1.814              <sourcepath>
   1.815 -                <path path="${web.docbase.dir}"/>
   1.816 +                <path path="${ear.docbase.dirs}"/>
   1.817              </sourcepath>
   1.818          </nbjpdaconnect>
   1.819      </target>
   1.820 -    <target if="do.display.browser.debug" name="debug-display-browser">
   1.821 +    <target if="do.display.browser" name="debug-display-browser">
   1.822          <nbbrowse url="${client.url}"/>
   1.823      </target>
   1.824 -    <target if="do.debug.client" name="connect-client-debugger">
   1.825 -        <webproject1:nbjsdebugstart webUrl="${client.url}"/>
   1.826 +    <target name="-init-debug-args">
   1.827 +        <property name="version-output" value="java version &quot;${ant.java.version}"/>
   1.828 +        <condition property="have-jdk-older-than-1.4">
   1.829 +            <or>
   1.830 +                <contains string="${version-output}" substring="java version &quot;1.0"/>
   1.831 +                <contains string="${version-output}" substring="java version &quot;1.1"/>
   1.832 +                <contains string="${version-output}" substring="java version &quot;1.2"/>
   1.833 +                <contains string="${version-output}" substring="java version &quot;1.3"/>
   1.834 +            </or>
   1.835 +        </condition>
   1.836 +        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   1.837 +            <istrue value="${have-jdk-older-than-1.4}"/>
   1.838 +        </condition>
   1.839      </target>
   1.840 -    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   1.841 -        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   1.842 -        <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   1.843 +    <target depends="init,-init-debug-args" if="can.debug.appclient" name="run-debug-appclient">
   1.844 +        <macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
   1.845 +            <attribute name="mainclass"/>
   1.846 +            <attribute default="${debug.classpath}" name="classpath"/>
   1.847 +            <element name="customize" optional="true"/>
   1.848 +            <attribute default="${application.args.param}" name="args"/>
   1.849 +            <sequential>
   1.850 +                <parallel>
   1.851 +                    <java classname="@{mainclass}" fork="true">
   1.852 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.853 +                        <jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
   1.854 +                        <jvmarg line="${debug-args-line}"/>
   1.855 +                        <jvmarg value="-Xrunjdwp:transport=${jpda.transport},server=y,address=${jpda.address},suspend=y"/>
   1.856 +                        <jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
   1.857 +                        <arg line="@{args}"/>
   1.858 +                        <classpath>
   1.859 +                            <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
   1.860 +                            <path path="@{classpath}"/>
   1.861 +                        </classpath>
   1.862 +                        <syspropertyset>
   1.863 +                            <propertyref prefix="run-sys-prop."/>
   1.864 +                            <mapper from="run-sys-prop.*" to="*" type="glob"/>
   1.865 +                        </syspropertyset>
   1.866 +                        <customize/>
   1.867 +                    </java>
   1.868 +                    <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
   1.869 +                        <classpath>
   1.870 +                            <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
   1.871 +                            <path path="@{classpath}"/>
   1.872 +                        </classpath>
   1.873 +                        <sourcepath>
   1.874 +                            <path path="${src.dir}"/>
   1.875 +                        </sourcepath>
   1.876 +                    </nbjpdaconnect>
   1.877 +                </parallel>
   1.878 +            </sequential>
   1.879 +        </macrodef>
   1.880 +        <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false"/>
   1.881 +        <antcall target="debug-${app.client}"/>
   1.882      </target>
   1.883 -    <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.884 -    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
   1.885 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
   1.886 -        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
   1.887 +    <!--
   1.888 +    CLEANUP SECTION
   1.889 +    -->
   1.890 +    <target depends="init" name="deps-clean" unless="no.deps">
   1.891 +        <condition property="build.deploy.on.save" value="false">
   1.892 +            <not>
   1.893 +                <isset property="build.deploy.on.save"/>
   1.894 +            </not>
   1.895 +        </condition>
   1.896 +        <ant antfile="${project.SpringDemo1-ejb}/build.xml" inheritall="false" target="clean-ear">
   1.897 +            <property location="${build.dir}" name="dist.ear.dir"/>
   1.898 +            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
   1.899 +        </ant>
   1.900 +        <condition property="build.deploy.on.save" value="false">
   1.901 +            <not>
   1.902 +                <isset property="build.deploy.on.save"/>
   1.903 +            </not>
   1.904 +        </condition>
   1.905 +        <ant antfile="${project.SpringDemo1-war}/build.xml" inheritall="false" target="clean-ear">
   1.906 +            <property location="${build.dir}" name="dist.ear.dir"/>
   1.907 +            <property name="deploy.on.save" value="${build.deploy.on.save}"/>
   1.908 +        </ant>
   1.909      </target>
   1.910 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   1.911 -        <webproject1:nbjpdastart name="${debug.class}"/>
   1.912 -    </target>
   1.913 -    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
   1.914 -        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   1.915 -        <webproject1:debug classname="${debug.class}"/>
   1.916 -    </target>
   1.917 -    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
   1.918 -    <target depends="init" name="-pre-debug-fix">
   1.919 -        <fail unless="fix.includes">Must set fix.includes</fail>
   1.920 -        <property name="javac.includes" value="${fix.includes}.java"/>
   1.921 -    </target>
   1.922 -    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
   1.923 -        <webproject1:nbjpdareload/>
   1.924 -    </target>
   1.925 -    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   1.926 -    <!--
   1.927 -                JAVADOC SECTION
   1.928 -            -->
   1.929 -    <target depends="init" name="javadoc-build">
   1.930 -        <mkdir dir="${dist.javadoc.dir}"/>
   1.931 -        <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}">
   1.932 -            <classpath>
   1.933 -                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
   1.934 -            </classpath>
   1.935 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   1.936 -                <filename name="**/*.java"/>
   1.937 -            </fileset>
   1.938 -            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   1.939 -                <include name="**/*.java"/>
   1.940 -            </fileset>
   1.941 -        </javadoc>
   1.942 -    </target>
   1.943 -    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
   1.944 -        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
   1.945 -    </target>
   1.946 -    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
   1.947 -    <!--
   1.948 -                
   1.949 -                JUNIT COMPILATION SECTION
   1.950 -            -->
   1.951 -    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
   1.952 -        <mkdir dir="${build.test.classes.dir}"/>
   1.953 -        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
   1.954 -    </target>
   1.955 -    <target name="-pre-compile-test">
   1.956 -        <!-- Empty placeholder for easier customization. -->
   1.957 -        <!-- You can override this target in the ../build.xml file. -->
   1.958 -    </target>
   1.959 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
   1.960 -        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   1.961 -        <copy todir="${build.test.classes.dir}">
   1.962 -            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   1.963 -        </copy>
   1.964 -    </target>
   1.965 -    <target name="-post-compile-test">
   1.966 -        <!-- Empty placeholder for easier customization. -->
   1.967 -        <!-- You can override this target in the ../build.xml file. -->
   1.968 -    </target>
   1.969 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
   1.970 -    <target name="-pre-compile-test-single">
   1.971 -        <!-- Empty placeholder for easier customization. -->
   1.972 -        <!-- You can override this target in the ../build.xml file. -->
   1.973 -    </target>
   1.974 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   1.975 -        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   1.976 -        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
   1.977 -        <copy todir="${build.test.classes.dir}">
   1.978 -            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   1.979 -        </copy>
   1.980 -    </target>
   1.981 -    <target name="-post-compile-test-single">
   1.982 -        <!-- Empty placeholder for easier customization. -->
   1.983 -        <!-- You can override this target in the ../build.xml file. -->
   1.984 -    </target>
   1.985 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
   1.986 -    <!--
   1.987 -                
   1.988 -                JUNIT EXECUTION SECTION
   1.989 -            -->
   1.990 -    <target depends="init" if="have.tests" name="-pre-test-run">
   1.991 -        <mkdir dir="${build.test.results.dir}"/>
   1.992 -    </target>
   1.993 -    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
   1.994 -        <webproject2:junit testincludes="**/*Test.java"/>
   1.995 -    </target>
   1.996 -    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
   1.997 -        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   1.998 -    </target>
   1.999 -    <target depends="init" if="have.tests" name="test-report"/>
  1.1000 -    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  1.1001 -    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  1.1002 -    <target depends="init" if="have.tests" name="-pre-test-run-single">
  1.1003 -        <mkdir dir="${build.test.results.dir}"/>
  1.1004 -    </target>
  1.1005 -    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1.1006 -        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1.1007 -        <webproject2:junit excludes="" includes="${test.includes}"/>
  1.1008 -    </target>
  1.1009 -    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  1.1010 -        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1.1011 -    </target>
  1.1012 -    <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.1013 -    <!--
  1.1014 -                
  1.1015 -                JUNIT DEBUGGING SECTION
  1.1016 -            -->
  1.1017 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  1.1018 -        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1.1019 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  1.1020 -        <delete file="${test.report.file}"/>
  1.1021 -        <!-- must exist, otherwise the XML formatter would fail -->
  1.1022 -        <mkdir dir="${build.test.results.dir}"/>
  1.1023 -        <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
  1.1024 -            <customize>
  1.1025 -                <arg value="showoutput=true"/>
  1.1026 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  1.1027 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  1.1028 -            </customize>
  1.1029 -        </webproject1:debug>
  1.1030 -    </target>
  1.1031 -    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  1.1032 -        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  1.1033 -    </target>
  1.1034 -    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1.1035 -    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  1.1036 -        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1.1037 -    </target>
  1.1038 -    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  1.1039 -    <!--
  1.1040 -                
  1.1041 -                CLEANUP SECTION
  1.1042 -            -->
  1.1043 -    <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
  1.1044      <target depends="init" name="do-clean">
  1.1045 -        <condition property="build.dir.to.clean" value="${build.web.dir}">
  1.1046 -            <isset property="dist.ear.dir"/>
  1.1047 -        </condition>
  1.1048 -        <property name="build.dir.to.clean" value="${build.web.dir}"/>
  1.1049 -        <delete includeEmptyDirs="true" quiet="true">
  1.1050 -            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
  1.1051 -        </delete>
  1.1052          <delete dir="${build.dir}"/>
  1.1053 -        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
  1.1054          <delete dir="${dist.dir}"/>
  1.1055 -    </target>
  1.1056 -    <target depends="do-clean" if="status.clean-failed" name="check-clean">
  1.1057 -        <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
  1.1058 -        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
  1.1059 +        <delete dir="${build.dir}"/>
  1.1060      </target>
  1.1061      <target depends="init" if="netbeans.home" name="undeploy-clean">
  1.1062          <nbundeploy failOnError="false" startServer="false"/>
  1.1063      </target>
  1.1064 -    <target name="-post-clean">
  1.1065 +    <target name="post-clean">
  1.1066          <!-- Empty placeholder for easier customization. -->
  1.1067          <!-- You can override this target in the ../build.xml file. -->
  1.1068      </target>
  1.1069 -    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
  1.1070 -    <target depends="clean" description="Clean build products." name="clean-ear"/>
  1.1071 +    <target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>
  1.1072  </project>