java/nekurak.net-ear/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Fri Jul 15 22:25:39 2011 +0200 (2011-07-15)
changeset 186 b0f7d9ab4a07
parent 142 44ef544460ca
child 188 74d06a8a4948
permissions -rw-r--r--
Glassfish 3.1.1
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3 *** GENERATED FROM project.xml - DO NOT EDIT  ***
     4 ***         EDIT ../build.xml INSTEAD         ***
     5 
     6 For the purpose of easier reading the script
     7 is divided into following sections:
     8 
     9   - initialization
    10   - compilation
    11   - dist
    12   - execution
    13   - debugging
    14   - cleanup
    15 
    16 -->
    17 <project xmlns:ear2="http://www.netbeans.org/ns/j2ee-earproject/2" basedir=".." default="default" name="nekurak.net-ear-impl">
    18 	<import file="ant-deploy.xml"/>
    19 	<fail message="Please build using Ant 1.7.1 or higher.">
    20 		<condition>
    21 			<not>
    22 				<antversion atleast="1.7.1"/>
    23 			</not>
    24 		</condition>
    25 	</fail>
    26 	<target depends="dist" description="Build whole project." name="default"/>
    27     <!-- 
    28     INITIALIZATION SECTION 
    29     -->
    30 	<target name="pre-init">
    31         <!-- Empty placeholder for easier customization. -->
    32         <!-- You can override this target in the ../build.xml file. -->
    33 	</target>
    34 	<target depends="pre-init" name="init-private">
    35 		<property file="nbproject/private/private.properties"/>
    36 	</target>
    37 	<target depends="pre-init,init-private" name="init-userdir">
    38 		<property location="${netbeans.user}/build.properties" name="user.properties.file"/>
    39 	</target>
    40 	<target depends="pre-init,init-private,init-userdir" name="init-user">
    41 		<property file="${user.properties.file}"/>
    42 	</target>
    43 	<target depends="pre-init,init-private,init-userdir,init-user" name="init-project">
    44 		<property file="nbproject/project.properties"/>
    45 	</target>
    46 	<target depends="pre-init,init-private,init-userdir,init-user,init-project" name="do-init">
    47         <!-- The two properties below are usually overridden -->
    48         <!-- by the active platform. Just a fallback. -->
    49 		<property name="default.javac.source" value="1.4"/>
    50 		<property name="default.javac.target" value="1.4"/>
    51 		<condition property="do.compile.jsps">
    52 			<istrue value="${compile.jsps}"/>
    53 		</condition>
    54 		<condition property="do.display.browser">
    55 			<and>
    56 				<istrue value="${display.browser}"/>
    57 				<isset property="client.module.uri"/>
    58 				<not>
    59 					<isset property="app.client"/>
    60 				</not>
    61 			</and>
    62 		</condition>
    63 		<available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
    64         <!--
    65                     Variables needed to support directory deployment.
    66                 -->
    67 		<condition property="do.package.with.custom.manifest.not.directory.deploy">
    68 			<and>
    69 				<isset property="has.custom.manifest"/>
    70 				<isfalse value="${directory.deployment.supported}"/>
    71 			</and>
    72 		</condition>
    73 		<condition property="do.package.without.custom.manifest.not.directory.deploy">
    74 			<and>
    75 				<not>
    76 					<isset property="has.custom.manifest"/>
    77 				</not>
    78 				<isfalse value="${directory.deployment.supported}"/>
    79 			</and>
    80 		</condition>
    81 		<condition property="do.package.not.directory.deploy">
    82 			<isfalse value="${directory.deployment.supported}"/>
    83 		</condition>
    84         <!--End Variables needed to support directory deployment.-->
    85 		<condition else="" property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}">
    86 			<and>
    87 				<isset property="main.class"/>
    88 				<not>
    89 					<equals arg1="${main.class}" arg2="" trim="true"/>
    90 				</not>
    91 			</and>
    92 		</condition>
    93 		<condition else="" property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}">
    94 			<and>
    95 				<isset property="j2ee.appclient.jvmoptions"/>
    96 				<not>
    97 					<equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
    98 				</not>
    99 			</and>
   100 		</condition>
   101 		<condition else="" property="application.args.param" value="${application.args}">
   102 			<and>
   103 				<isset property="application.args"/>
   104 				<not>
   105 					<equals arg1="${application.args}" arg2="" trim="true"/>
   106 				</not>
   107 			</and>
   108 		</condition>
   109 		<condition property="can.debug.appclient">
   110 			<and>
   111 				<isset property="netbeans.home"/>
   112 				<isset property="app.client"/>
   113 			</and>
   114 		</condition>
   115 		<path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   116 		<condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   117 			<and>
   118 				<isset property="endorsed.classpath"/>
   119 				<length length="0" string="${endorsed.classpath}" when="greater"/>
   120 			</and>
   121 		</condition>
   122 	</target>
   123 	<target depends="init" name="-init-cos">
   124 		<condition else="false" property="build.deploy.on.save">
   125 			<istrue value="${j2ee.deploy.on.save}"/>
   126 		</condition>
   127 	</target>
   128 	<target name="post-init">
   129         <!-- Empty placeholder for easier customization. -->
   130         <!-- You can override this target in the ../build.xml file. -->
   131 	</target>
   132 	<target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init" name="init-check">
   133 		<fail unless="build.dir">Must set build.dir</fail>
   134 		<fail unless="build.generated.dir">Must set build.generated.dir</fail>
   135 		<fail unless="dist.dir">Must set dist.dir</fail>
   136 		<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   137 		<fail unless="dist.jar">Must set dist.jar</fail>
   138 	</target>
   139 	<target name="-init-taskdefs">
   140 		<fail unless="libs.CopyLibs.classpath">
   141 The libs.CopyLibs.classpath property is not set up.
   142 This property must point to 
   143 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
   144 of NetBeans IDE installation and is usually located at 
   145 &lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
   146 Either open the project in the IDE and make sure CopyLibs library
   147 exists or setup the property manually. For example like this:
   148  ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
   149 		</fail>
   150 		<taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
   151 	</target>
   152 	<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
   153 	<target name="-profile-pre-init">
   154         <!-- Empty placeholder for easier customization. -->
   155         <!-- You can override this target in the ../build.xml file. -->
   156 	</target>
   157 	<target name="-profile-post-init">
   158         <!-- Empty placeholder for easier customization. -->
   159         <!-- You can override this target in the ../build.xml file. -->
   160 	</target>
   161 	<target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
   162 		<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   163 		<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   164 	</target>
   165 	<target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs" name="init"/>
   166     <!--
   167     COMPILATION SECTION
   168     -->
   169 	<target depends="init" name="deps-jar" unless="no.deps"/>
   170 	<target depends="init" name="deps-j2ee-archive" unless="no.deps">
   171 		<condition property="build.deploy.on.save" value="false">
   172 			<not>
   173 				<isset property="build.deploy.on.save"/>
   174 			</not>
   175 		</condition>
   176 		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="dist-ear">
   177 			<property location="${build.dir}" name="dist.ear.dir"/>
   178 			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
   179 		</ant>
   180 		<condition property="build.deploy.on.save" value="false">
   181 			<not>
   182 				<isset property="build.deploy.on.save"/>
   183 			</not>
   184 		</condition>
   185 		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="dist-ear">
   186 			<property location="${build.dir}" name="dist.ear.dir"/>
   187 			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
   188 		</ant>
   189 		<condition property="build.deploy.on.save" value="false">
   190 			<not>
   191 				<isset property="build.deploy.on.save"/>
   192 			</not>
   193 		</condition>
   194 		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="dist-ear">
   195 			<property location="${build.dir}" name="dist.ear.dir"/>
   196 			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
   197 		</ant>
   198 		<condition property="build.deploy.on.save" value="false">
   199 			<not>
   200 				<isset property="build.deploy.on.save"/>
   201 			</not>
   202 		</condition>
   203 		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="dist-ear">
   204 			<property location="${build.dir}" name="dist.ear.dir"/>
   205 			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
   206 		</ant>
   207 	</target>
   208 	<target depends="init,deps-jar,deps-j2ee-archive" name="pre-pre-compile"/>
   209 	<target name="pre-compile">
   210         <!-- Empty placeholder for easier customization. -->
   211         <!-- You can override this target in the ../build.xml file. -->
   212 	</target>
   213 	<target depends="init,deps-jar,pre-pre-compile,pre-compile,-do-compile-deps" name="do-compile">
   214 		<copy todir="${build.dir}/META-INF">
   215 			<fileset dir="${meta.inf}"/>
   216 		</copy>
   217 	</target>
   218 	<target depends="init,deps-jar,pre-pre-compile,pre-compile" name="-do-compile-deps">
   219 		<copyfiles files="${reference.nekurak_net-web.dist-ear}" todir="${build.dir}//"/>
   220 		<copyfiles files="${reference.nekurak_net-ejb.dist-ear}" todir="${build.dir}//"/>
   221 		<copyfiles files="${reference.nekurak_net-rest.dist-ear}" todir="${build.dir}//"/>
   222 		<copyfiles files="${reference.nekurak_net-ws.dist-ear}" todir="${build.dir}//"/>
   223 	</target>
   224 	<target name="post-compile">
   225         <!-- Empty placeholder for easier customization. -->
   226         <!-- You can override this target in the ../build.xml file. -->
   227 	</target>
   228 	<target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
   229     <!--
   230                 DIST BUILDING SECTION
   231             -->
   232 	<target name="pre-dist">
   233         <!-- Empty placeholder for easier customization. -->
   234         <!-- You can override this target in the ../build.xml file. -->
   235 	</target>
   236 	<target depends="init,compile,pre-dist" name="do-dist-without-manifest" unless="has.custom.manifest">
   237 		<dirname file="${dist.jar}" property="dist.jar.dir"/>
   238 		<mkdir dir="${dist.jar.dir}"/>
   239 		<jar compress="${jar.compress}" jarfile="${dist.jar}">
   240 			<fileset dir="${build.dir}"/>
   241 		</jar>
   242 	</target>
   243 	<target depends="init,compile,pre-dist" if="has.custom.manifest" name="do-dist-with-manifest">
   244 		<dirname file="${dist.jar}" property="dist.jar.dir"/>
   245 		<mkdir dir="${dist.jar.dir}"/>
   246 		<jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
   247 			<fileset dir="${build.dir}"/>
   248 		</jar>
   249 	</target>
   250     <!--
   251                 TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
   252             -->
   253 	<target depends="init,compile,pre-dist" if="do.package.without.custom.manifest.not.directory.deploy" name="-do-tmp-dist-without-manifest">
   254 		<dirname file="${dist.jar}" property="dist.jar.dir"/>
   255 		<mkdir dir="${dist.jar.dir}"/>
   256 		<jar compress="${jar.compress}" jarfile="${dist.jar}">
   257 			<fileset dir="${build.dir}"/>
   258 		</jar>
   259 	</target>
   260 	<target depends="init,compile,pre-dist" if="do.package.with.custom.manifest.not.directory.deploy" name="-do-tmp-dist-with-manifest">
   261 		<dirname file="${dist.jar}" property="dist.jar.dir"/>
   262 		<mkdir dir="${dist.jar.dir}"/>
   263 		<jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
   264 			<fileset dir="${build.dir}"/>
   265 		</jar>
   266 	</target>
   267 	<target depends="init,compile,pre-dist,-do-tmp-dist-without-manifest,-do-tmp-dist-with-manifest" name="-do-dist-directory-deploy"/>
   268 	<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"/>
   269     <!--
   270                 END TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
   271             -->
   272 	<target name="post-dist">
   273         <!-- Empty placeholder for easier customization. -->
   274         <!-- You can override this target in the ../build.xml file. -->
   275 	</target>
   276 	<target depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)." name="dist"/>
   277     <!--
   278     EXECUTION SECTION
   279     -->
   280 	<target depends="run-deploy,run-display-browser,run-ac" description="Deploy to server." name="run"/>
   281 	<target name="pre-run-deploy">
   282         <!-- Empty placeholder for easier customization. -->
   283         <!-- You can override this target in the ../build.xml file. -->
   284 	</target>
   285 	<target name="post-run-deploy">
   286         <!-- Empty placeholder for easier customization. -->
   287         <!-- You can override this target in the ../build.xml file. -->
   288 	</target>
   289 	<target name="-pre-nbmodule-run-deploy">
   290         <!-- Empty placeholder for easier customization. -->
   291         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
   292 	</target>
   293 	<target name="-post-nbmodule-run-deploy">
   294         <!-- Empty placeholder for easier customization. -->
   295         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
   296 	</target>
   297 	<target name="-run-deploy-am" unless="no.deps">
   298         <!-- Task to deploy to the Access Manager runtime. -->
   299 		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
   300 		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="-run-deploy-am"/>
   301 		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="-run-deploy-am"/>
   302 		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="-run-deploy-am"/>
   303 	</target>
   304 	<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"/>
   305 	<target if="netbeans.home" name="-run-deploy-nb">
   306 		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
   307 	</target>
   308 	<target name="-init-deploy-ant" unless="netbeans.home">
   309 		<property name="deploy.ant.archive" value="${dist.jar}"/>
   310 		<property name="deploy.ant.resource.dir" value="${resource.dir}"/>
   311 		<property name="deploy.ant.enabled" value="true"/>
   312 	</target>
   313 	<target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
   314 	<target if="netbeans.home" name="-run-undeploy-nb">
   315 		<fail message="Undeploy is not supported from within the IDE"/>
   316 	</target>
   317 	<target depends="dist" name="verify">
   318 		<nbverify file="${dist.jar}"/>
   319 	</target>
   320 	<target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
   321 	<target if="do.display.browser" name="-init-display-browser">
   322 		<condition property="do.display.browser.nb">
   323 			<isset property="netbeans.home"/>
   324 		</condition>
   325 		<condition property="do.display.browser.cl">
   326 			<and>
   327 				<isset property="deploy.ant.enabled"/>
   328 				<isset property="deploy.ant.client.url"/>
   329 			</and>
   330 		</condition>
   331 	</target>
   332 	<target if="do.display.browser.nb" name="-display-browser-nb">
   333 		<nbbrowse url="${client.url}"/>
   334 	</target>
   335 	<target if="do.display.browser.cl" name="-get-browser" unless="browser">
   336 		<condition property="browser" value="rundll32">
   337 			<os family="windows"/>
   338 		</condition>
   339 		<condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
   340 			<os family="windows"/>
   341 		</condition>
   342 		<condition property="browser" value="/usr/bin/open">
   343 			<os family="mac"/>
   344 		</condition>
   345 		<property environment="env"/>
   346 		<condition property="browser" value="${env.BROWSER}">
   347 			<isset property="env.BROWSER"/>
   348 		</condition>
   349 		<condition property="browser" value="/usr/bin/firefox">
   350 			<available file="/usr/bin/firefox"/>
   351 		</condition>
   352 		<condition property="browser" value="/usr/local/firefox/firefox">
   353 			<available file="/usr/local/firefox/firefox"/>
   354 		</condition>
   355 		<condition property="browser" value="/usr/bin/mozilla">
   356 			<available file="/usr/bin/mozilla"/>
   357 		</condition>
   358 		<condition property="browser" value="/usr/local/mozilla/mozilla">
   359 			<available file="/usr/local/mozilla/mozilla"/>
   360 		</condition>
   361 		<condition property="browser" value="/usr/sfw/lib/firefox/firefox">
   362 			<available file="/usr/sfw/lib/firefox/firefox"/>
   363 		</condition>
   364 		<condition property="browser" value="/opt/csw/bin/firefox">
   365 			<available file="/opt/csw/bin/firefox"/>
   366 		</condition>
   367 		<condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
   368 			<available file="/usr/sfw/lib/mozilla/mozilla"/>
   369 		</condition>
   370 		<condition property="browser" value="/opt/csw/bin/mozilla">
   371 			<available file="/opt/csw/bin/mozilla"/>
   372 		</condition>
   373 	</target>
   374 	<target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
   375 		<fail unless="browser">
   376             Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
   377 		</fail>
   378 		<property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
   379 		<echo>Launching ${browse.url}</echo>
   380 		<exec executable="${browser}" spawn="true">
   381 			<arg line="${browser.args} ${browse.url}"/>
   382 		</exec>
   383 	</target>
   384 	<target if="app.client" name="run-ac">
   385 		<antcall target="-run-ac"/>
   386 	</target>
   387 	<target depends="init,-as-retrieve-option-workaround,-init-run-macros,-run-appclient-pregfv3,-run-appclient" name="-run-ac"/>
   388 	<target if="j2ee.appclient.tool.args" name="-run-appclient-pregfv3">
   389 		<ear2:run-appclient-pregfv3/>
   390 	</target>
   391 	<target name="-run-appclient" unless="j2ee.appclient.tool.args">
   392 		<ear2:run-appclient subprojectname="${app.client}"/>
   393 	</target>
   394 	<target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
   395 		<property name="client.jar" value="${dist.dir}/nekurak.net-earClient.jar"/>
   396 		<sleep seconds="3"/>
   397 		<copy failonerror="false" file="${wa.copy.client.jar.from}/nekurak.net-ear/nekurak.net-earClient.jar" todir="${dist.dir}"/>
   398 		<copy failonerror="false" flatten="true" todir="${dist.dir}/">
   399 			<fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/nekurak.net-earClient.jar"/>
   400 		</copy>
   401 		<copy flatten="true" todir="${dist.dir}/nekurak.net-earClient">
   402 			<fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/*.*ar"/>
   403 		</copy>
   404 		<copy failonerror="false" flatten="false" todir="${dist.dir}/nekurak.net-earClient">
   405 			<fileset dir="${dist.dir}/gfdeploy/nekurak.net-ear" includes="**/*.jar"/>
   406 		</copy>
   407 	</target>
   408 	<target depends="init" name="-init-run-macros">
   409 		<macrodef name="run-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
   410 			<attribute name="subprojectname"/>
   411 			<attribute default="${application.args.param}" name="args"/>
   412 			<element name="customize" optional="true"/>
   413 			<sequential>
   414 				<java dir="${basedir}" fork="true" jar="${client.jar}">
   415 					<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   416 					<jvmarg line="${j2ee.appclient.tool.jvmoptions}${client.jar},arg=-name,arg=@{subprojectname}"/>
   417 					<jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
   418 					<arg line="@{args}"/>
   419 					<syspropertyset>
   420 						<propertyref prefix="run-sys-prop."/>
   421 						<mapper from="run-sys-prop.*" to="*" type="glob"/>
   422 					</syspropertyset>
   423 					<customize/>
   424 				</java>
   425 			</sequential>
   426 		</macrodef>
   427 		<macrodef name="run-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
   428 			<element name="customize" optional="true"/>
   429 			<sequential>
   430 				<java classname="${j2ee.appclient.tool.mainclass}" fork="true">
   431 					<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   432 					<jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
   433 					<jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
   434 					<arg line="${j2ee.appclient.tool.args}"/>
   435 					<arg line="-client ${client.jar}"/>
   436 					<arg line="${j2ee.appclient.mainclass.tool.param}"/>
   437 					<arg line="${application.args.param}"/>
   438 					<classpath>
   439 						<path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
   440 					</classpath>
   441 					<syspropertyset>
   442 						<propertyref prefix="run-sys-prop."/>
   443 						<mapper from="run-sys-prop.*" to="*" type="glob"/>
   444 					</syspropertyset>
   445 					<customize/>
   446 				</java>
   447 			</sequential>
   448 		</macrodef>
   449 	</target>
   450     <!--
   451     DEBUGGING SECTION
   452     -->
   453 	<target depends="run-debug,run-debug-appclient" description="Deploy to server." name="debug"/>
   454 	<target depends="dist" description="Debug project in IDE." if="netbeans.home" name="run-debug" unless="app.client">
   455 		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
   456 		<antcall target="connect-debugger"/>
   457 		<antcall target="debug-display-browser"/>
   458 	</target>
   459 	<target name="connect-debugger" unless="is.debugged">
   460 		<nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${jpda.host}:${jpda.address}" transport="${jpda.transport}">
   461 			<classpath>
   462 				<path path="${debug.classpath}"/>
   463 				<fileset dir="${build.dir}" includes="lib/*.jar"/>
   464 			</classpath>
   465 			<sourcepath>
   466 				<path path="${ear.docbase.dirs}"/>
   467 			</sourcepath>
   468 		</nbjpdaconnect>
   469 	</target>
   470 	<target if="do.display.browser" name="debug-display-browser">
   471 		<nbbrowse url="${client.url}"/>
   472 	</target>
   473 	<target if="can.debug.appclient" name="run-debug-appclient">
   474 		<antcall target="-run-debug-appclient"/>
   475 	</target>
   476 	<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"/>
   477 	<target name="-init-debug-args">
   478 		<property name="version-output" value="java version &quot;${ant.java.version}"/>
   479 		<condition property="have-jdk-older-than-1.4">
   480 			<or>
   481 				<contains string="${version-output}" substring="java version &quot;1.0"/>
   482 				<contains string="${version-output}" substring="java version &quot;1.1"/>
   483 				<contains string="${version-output}" substring="java version &quot;1.2"/>
   484 				<contains string="${version-output}" substring="java version &quot;1.3"/>
   485 			</or>
   486 		</condition>
   487 		<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   488 			<istrue value="${have-jdk-older-than-1.4}"/>
   489 		</condition>
   490 	</target>
   491 	<target depends="init,-init-debug-args,-as-retrieve-option-workaround,-init-run-macros" name="-init-debug-macros">
   492 		<condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   493 			<os family="windows"/>
   494 		</condition>
   495 		<condition else="${debug-transport-by-os}" property="debug-transport-appclient" value="${debug.transport}">
   496 			<isset property="debug.transport"/>
   497 		</condition>
   498 		<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
   499 			<attribute default="${main.class}" name="name"/>
   500 			<attribute default="${debug.classpath}" name="classpath"/>
   501 			<attribute default="" name="stopclassname"/>
   502 			<sequential>
   503 				<nbjpdastart addressproperty="jpda.address.appclient" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport-appclient}">
   504 					<classpath>
   505 						<path path="@{classpath}"/>
   506 					</classpath>
   507 				</nbjpdastart>
   508 			</sequential>
   509 		</macrodef>
   510 		<macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
   511 			<attribute name="subprojectname"/>
   512 			<sequential>
   513 				<ear2:run-appclient subprojectname="@{subprojectname}">
   514 					<customize>
   515 						<jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
   516 						<jvmarg line="${debug-args-line}"/>
   517 					</customize>
   518 				</ear2:run-appclient>
   519 			</sequential>
   520 		</macrodef>
   521 		<macrodef name="debug-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
   522 			<sequential>
   523 				<ear2:run-appclient-pregfv3>
   524 					<customize>
   525 						<jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
   526 						<jvmarg line="${debug-args-line}"/>
   527 					</customize>
   528 				</ear2:run-appclient-pregfv3>
   529 			</sequential>
   530 		</macrodef>
   531 	</target>
   532 	<target name="-debug-appclient-deploy">
   533 		<nbstartserver debugmode="true"/>
   534 		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
   535 	</target>
   536 	<target name="-debug-appclient-start-nbjpda">
   537 		<ear2:nbjpdastart classpath="" name="${app.client}"/>
   538 	</target>
   539 	<target if="j2ee.appclient.tool.args" name="-debug-appclient-pregfv3">
   540 		<ear2:debug-appclient-pregfv3/>
   541 	</target>
   542 	<target name="-debug-appclient" unless="j2ee.appclient.tool.args">
   543 		<ear2:debug-appclient subprojectname="${app.client}"/>
   544 	</target>
   545     <!--
   546     =================
   547     PROFILING SECTION
   548     =================
   549     -->
   550 	<target description="Profile a J2EE project in the IDE." name="profile">
   551 		<condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
   552 			<isset property="profiler.info.jvmargs.extra"/>
   553 		</condition>
   554 		<antcall target="${profiler.startserver.target}"/>
   555 		<antcall target="run"/>
   556 		<antcall target="start-loadgen"/>
   557 	</target>
   558 	<target name="start-profiled-server">
   559 		<nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
   560 			<jvmarg value="${profiler.info.jvmargs.agent}"/>
   561 			<jvmarg value="${profiler.j2ee.agentID}"/>
   562 		</nbstartprofiledserver>
   563 	</target>
   564 	<target name="start-profiled-server-extraargs">
   565 		<nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
   566 			<jvmarg value="${profiler.info.jvmargs.extra}"/>
   567 			<jvmarg value="${profiler.info.jvmargs.agent}"/>
   568 			<jvmarg value="${profiler.j2ee.agentID}"/>
   569 		</nbstartprofiledserver>
   570 	</target>
   571 	<target if="profiler.loadgen.path" name="start-loadgen">
   572 		<loadgenstart path="${profiler.loadgen.path}"/>
   573 	</target>
   574     <!--
   575     CLEANUP SECTION
   576     -->
   577 	<target depends="init" name="deps-clean" unless="no.deps">
   578 		<condition property="build.deploy.on.save" value="false">
   579 			<not>
   580 				<isset property="build.deploy.on.save"/>
   581 			</not>
   582 		</condition>
   583 		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="clean-ear">
   584 			<property location="${build.dir}" name="dist.ear.dir"/>
   585 			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
   586 		</ant>
   587 		<condition property="build.deploy.on.save" value="false">
   588 			<not>
   589 				<isset property="build.deploy.on.save"/>
   590 			</not>
   591 		</condition>
   592 		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="clean-ear">
   593 			<property location="${build.dir}" name="dist.ear.dir"/>
   594 			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
   595 		</ant>
   596 		<condition property="build.deploy.on.save" value="false">
   597 			<not>
   598 				<isset property="build.deploy.on.save"/>
   599 			</not>
   600 		</condition>
   601 		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="clean-ear">
   602 			<property location="${build.dir}" name="dist.ear.dir"/>
   603 			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
   604 		</ant>
   605 		<condition property="build.deploy.on.save" value="false">
   606 			<not>
   607 				<isset property="build.deploy.on.save"/>
   608 			</not>
   609 		</condition>
   610 		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="clean-ear">
   611 			<property location="${build.dir}" name="dist.ear.dir"/>
   612 			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
   613 		</ant>
   614 	</target>
   615 	<target depends="init" name="do-clean">
   616 		<delete dir="${build.dir}"/>
   617 		<delete dir="${dist.dir}"/>
   618 		<delete dir="${build.dir}"/>
   619 	</target>
   620 	<target depends="init" if="netbeans.home" name="undeploy-clean">
   621 		<nbundeploy failOnError="false" startServer="false"/>
   622 	</target>
   623 	<target name="post-clean">
   624         <!-- Empty placeholder for easier customization. -->
   625         <!-- You can override this target in the ../build.xml file. -->
   626 	</target>
   627 	<target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>
   628 </project>