1.1 --- a/java/nekurak.net-ear/nbproject/build-impl.xml Mon Apr 12 10:50:39 2010 +0200
1.2 +++ b/java/nekurak.net-ear/nbproject/build-impl.xml Wed Jan 12 16:15:37 2011 +0100
1.3 @@ -365,8 +365,15 @@
1.4 <arg line="${browser.args} ${browse.url}"/>
1.5 </exec>
1.6 </target>
1.7 - <target depends="init" if="app.client" name="run-ac">
1.8 - <antcall target="run-${app.client}"/>
1.9 + <target if="app.client" name="run-ac">
1.10 + <antcall target="-run-ac"/>
1.11 + </target>
1.12 + <target depends="init,-as-retrieve-option-workaround,-init-run-macros,-run-appclient-pregfv3,-run-appclient" name="-run-ac"/>
1.13 + <target if="j2ee.appclient.tool.args" name="-run-appclient-pregfv3">
1.14 + <ear2:run-appclient-pregfv3/>
1.15 + </target>
1.16 + <target name="-run-appclient" unless="j2ee.appclient.tool.args">
1.17 + <ear2:run-appclient subprojectname="${app.client}"/>
1.18 </target>
1.19 <target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
1.20 <property name="client.jar" value="${dist.dir}/nekurak.net-earClient.jar"/>
1.21 @@ -382,6 +389,47 @@
1.22 <fileset dir="${dist.dir}/gfdeploy/nekurak.net-ear" includes="**/*.jar"/>
1.23 </copy>
1.24 </target>
1.25 + <target depends="init" name="-init-run-macros">
1.26 + <macrodef name="run-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
1.27 + <attribute name="subprojectname"/>
1.28 + <attribute default="${application.args.param}" name="args"/>
1.29 + <element name="customize" optional="true"/>
1.30 + <sequential>
1.31 + <java dir="${basedir}" fork="true" jar="${client.jar}">
1.32 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.33 + <jvmarg line="${j2ee.appclient.tool.jvmoptions}${client.jar},arg=-name,arg=@{subprojectname}"/>
1.34 + <arg line="@{args}"/>
1.35 + <syspropertyset>
1.36 + <propertyref prefix="run-sys-prop."/>
1.37 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
1.38 + </syspropertyset>
1.39 + <customize/>
1.40 + </java>
1.41 + </sequential>
1.42 + </macrodef>
1.43 + <macrodef name="run-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
1.44 + <element name="customize" optional="true"/>
1.45 + <sequential>
1.46 + <java classname="${j2ee.appclient.tool.mainclass}" fork="true">
1.47 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.48 + <jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
1.49 + <jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
1.50 + <arg line="${j2ee.appclient.tool.args}"/>
1.51 + <arg line="-client ${client.jar}"/>
1.52 + <arg line="${j2ee.appclient.mainclass.tool.param}"/>
1.53 + <arg line="${application.args.param}"/>
1.54 + <classpath>
1.55 + <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
1.56 + </classpath>
1.57 + <syspropertyset>
1.58 + <propertyref prefix="run-sys-prop."/>
1.59 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
1.60 + </syspropertyset>
1.61 + <customize/>
1.62 + </java>
1.63 + </sequential>
1.64 + </macrodef>
1.65 + </target>
1.66 <!--
1.67 DEBUGGING SECTION
1.68 -->
1.69 @@ -392,10 +440,10 @@
1.70 <antcall target="debug-display-browser"/>
1.71 </target>
1.72 <target name="connect-debugger" unless="is.debugged">
1.73 - <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
1.74 + <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${jpda.host}:${jpda.address}" transport="${jpda.transport}">
1.75 <classpath>
1.76 <path path="${debug.classpath}"/>
1.77 - <fileset dir="${build.dir}/lib" includes="*.jar"/>
1.78 + <fileset dir="${build.dir}" includes="lib/*.jar"/>
1.79 </classpath>
1.80 <sourcepath>
1.81 <path path="${ear.docbase.dirs}"/>
1.82 @@ -405,6 +453,10 @@
1.83 <target if="do.display.browser" name="debug-display-browser">
1.84 <nbbrowse url="${client.url}"/>
1.85 </target>
1.86 + <target if="can.debug.appclient" name="run-debug-appclient">
1.87 + <antcall target="-run-debug-appclient"/>
1.88 + </target>
1.89 + <target depends="init,-init-debug-args,-debug-appclient-deploy,-as-retrieve-option-workaround,-init-debug-macros,-debug-appclient-start-nbjpda,-debug-appclient-pregfv3,-debug-appclient,connect-debugger" name="-run-debug-appclient"/>
1.90 <target name="-init-debug-args">
1.91 <property name="version-output" value="java version "${ant.java.version}"/>
1.92 <condition property="have-jdk-older-than-1.4">
1.93 @@ -419,45 +471,63 @@
1.94 <istrue value="${have-jdk-older-than-1.4}"/>
1.95 </condition>
1.96 </target>
1.97 - <target depends="init,-init-debug-args" if="can.debug.appclient" name="run-debug-appclient">
1.98 - <macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
1.99 - <attribute name="mainclass"/>
1.100 + <target depends="init,-init-debug-args,-as-retrieve-option-workaround,-init-run-macros" name="-init-debug-macros">
1.101 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
1.102 + <os family="windows"/>
1.103 + </condition>
1.104 + <condition else="${debug-transport-by-os}" property="debug-transport-appclient" value="${debug.transport}">
1.105 + <isset property="debug.transport"/>
1.106 + </condition>
1.107 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
1.108 + <attribute default="${main.class}" name="name"/>
1.109 <attribute default="${debug.classpath}" name="classpath"/>
1.110 - <element name="customize" optional="true"/>
1.111 - <attribute default="${application.args.param}" name="args"/>
1.112 + <attribute default="" name="stopclassname"/>
1.113 <sequential>
1.114 - <parallel>
1.115 - <java classname="@{mainclass}" fork="true">
1.116 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.117 - <jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
1.118 - <jvmarg line="${debug-args-line}"/>
1.119 - <jvmarg value="-Xrunjdwp:transport=${jpda.transport},server=y,address=${jpda.address},suspend=y"/>
1.120 - <jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
1.121 - <arg line="@{args}"/>
1.122 - <classpath>
1.123 - <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
1.124 - <path path="@{classpath}"/>
1.125 - </classpath>
1.126 - <syspropertyset>
1.127 - <propertyref prefix="run-sys-prop."/>
1.128 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
1.129 - </syspropertyset>
1.130 - <customize/>
1.131 - </java>
1.132 - <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
1.133 - <classpath>
1.134 - <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
1.135 - <path path="@{classpath}"/>
1.136 - </classpath>
1.137 - <sourcepath>
1.138 - <path path="${src.dir}"/>
1.139 - </sourcepath>
1.140 - </nbjpdaconnect>
1.141 - </parallel>
1.142 + <nbjpdastart addressproperty="jpda.address.appclient" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport-appclient}">
1.143 + <classpath>
1.144 + <path path="@{classpath}"/>
1.145 + </classpath>
1.146 + </nbjpdastart>
1.147 </sequential>
1.148 </macrodef>
1.149 - <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false"/>
1.150 - <antcall target="debug-${app.client}"/>
1.151 + <macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
1.152 + <attribute name="subprojectname"/>
1.153 + <sequential>
1.154 + <ear2:run-appclient subprojectname="@{subprojectname}">
1.155 + <customize>
1.156 + <jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
1.157 + <jvmarg line="${debug-args-line}"/>
1.158 + </customize>
1.159 + </ear2:run-appclient>
1.160 + </sequential>
1.161 + </macrodef>
1.162 + <macrodef name="debug-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
1.163 + <sequential>
1.164 + <ear2:run-appclient-pregfv3>
1.165 + <customize>
1.166 + <jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
1.167 + <jvmarg line="${debug-args-line}"/>
1.168 + </customize>
1.169 + </ear2:run-appclient-pregfv3>
1.170 + </sequential>
1.171 + </macrodef>
1.172 + </target>
1.173 + <target name="-debug-appclient-deploy">
1.174 + <nbstartserver debugmode="true"/>
1.175 + <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
1.176 + </target>
1.177 + <target name="-debug-appclient-start-nbjpda">
1.178 + <ear2:nbjpdastart classpath="" name="${app.client}"/>
1.179 + </target>
1.180 + <target if="j2ee.appclient.tool.args" name="-debug-appclient-pregfv3">
1.181 + <ear2:debug-appclient-pregfv3/>
1.182 + </target>
1.183 + <target name="-debug-appclient" unless="j2ee.appclient.tool.args">
1.184 + <mkdir dir="${dist.dir}/nekurak.net-earClient"/>
1.185 + <copy flatten="true" todir="${dist.dir}/nekurak.net-earClient">
1.186 + <fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/*.*ar"/>
1.187 + </copy>
1.188 + <ear2:debug-appclient subprojectname="${app.client}"/>
1.189 </target>
1.190 <!--
1.191 CLEANUP SECTION