1 <?xml version="1.0" encoding="UTF-8"?>
3 *** GENERATED FROM project.xml - DO NOT EDIT ***
4 *** EDIT ../build.xml INSTEAD ***
6 For the purpose of easier reading the script
7 is divided into following sections:
20 <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="nekurak.net-ws-impl">
21 <import file="jaxws-build.xml"/>
22 <import file="ant-deploy.xml"/>
23 <fail message="Please build using Ant 1.7.1 or higher.">
26 <antversion atleast="1.7.1"/>
30 <target depends="dist,javadoc" description="Build whole project." name="default"/>
32 INITIALIZATION SECTION
34 <target name="-pre-init">
35 <!-- Empty placeholder for easier customization. -->
36 <!-- You can override this target in the ../build.xml file. -->
38 <target depends="-pre-init" name="-init-private">
39 <property file="nbproject/private/private.properties"/>
41 <target depends="-pre-init,-init-private" name="-init-user">
42 <property file="${user.properties.file}"/>
43 <!-- The two properties below are usually overridden -->
44 <!-- by the active platform. Just a fallback. -->
45 <property name="default.javac.source" value="1.4"/>
46 <property name="default.javac.target" value="1.4"/>
48 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
49 <property file="nbproject/project.properties"/>
51 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
52 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
53 <condition property="have.tests">
55 <available file="${test.src.dir}"/>
58 <condition property="have.sources">
60 <available file="${src.dir}"/>
63 <condition property="netbeans.home+have.tests">
65 <isset property="netbeans.home"/>
66 <isset property="have.tests"/>
69 <condition property="no.javadoc.preview">
70 <isfalse value="${javadoc.preview}"/>
72 <property name="javac.compilerargs" value=""/>
73 <condition property="no.deps">
75 <istrue value="${no.dependencies}"/>
78 <condition property="no.dist.ear.dir">
80 <isset property="dist.ear.dir"/>
83 <property name="build.web.excludes" value="${build.classes.excludes}"/>
84 <condition property="do.compile.jsps">
85 <istrue value="${compile.jsps}"/>
87 <condition property="do.debug.server">
90 <isset property="debug.server"/>
92 <istrue value="${debug.server}"/>
95 <istrue value="${debug.server}"/>
98 <istrue value="${debug.client}"/>
103 <condition property="do.debug.client">
104 <istrue value="${debug.client}"/>
106 <condition property="do.display.browser">
107 <istrue value="${display.browser}"/>
109 <condition property="do.display.browser.debug">
111 <isset property="do.display.browser"/>
113 <isset property="do.debug.client"/>
117 <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
118 <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
119 <condition property="do.war.package.with.custom.manifest">
120 <isset property="has.custom.manifest"/>
122 <condition property="do.war.package.without.custom.manifest">
124 <isset property="has.custom.manifest"/>
127 <condition property="do.tmp.war.package.with.custom.manifest">
129 <isset property="has.custom.manifest"/>
131 <isfalse value="${directory.deployment.supported}"/>
132 <isset property="dist.ear.dir"/>
136 <condition property="do.tmp.war.package.without.custom.manifest">
139 <isset property="has.custom.manifest"/>
142 <isfalse value="${directory.deployment.supported}"/>
143 <isset property="dist.ear.dir"/>
147 <condition property="do.tmp.war.package">
149 <isfalse value="${directory.deployment.supported}"/>
150 <isset property="dist.ear.dir"/>
153 <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
154 <condition else="" property="application.args.param" value="${application.args}">
156 <isset property="application.args"/>
158 <equals arg1="${application.args}" arg2="" trim="true"/>
162 <property name="source.encoding" value="${file.encoding}"/>
163 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
165 <isset property="javadoc.encoding"/>
167 <equals arg1="${javadoc.encoding}" arg2=""/>
171 <property name="javadoc.encoding.used" value="${source.encoding}"/>
172 <property name="includes" value="**"/>
173 <property name="excludes" value=""/>
174 <property name="runmain.jvmargs" value=""/>
175 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
176 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
177 <length length="0" string="${endorsed.classpath}" when="greater"/>
180 <target depends="init" name="-init-cos" unless="deploy.on.save">
181 <condition property="deploy.on.save" value="true">
182 <istrue value="${j2ee.deploy.on.save}"/>
185 <target name="-post-init">
186 <!-- Empty placeholder for easier customization. -->
187 <!-- You can override this target in the ../build.xml file. -->
189 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
190 <fail unless="src.dir">Must set src.dir</fail>
191 <fail unless="test.src.dir">Must set test.src.dir</fail>
192 <fail unless="build.dir">Must set build.dir</fail>
193 <fail unless="build.web.dir">Must set build.web.dir</fail>
194 <fail unless="build.generated.dir">Must set build.generated.dir</fail>
195 <fail unless="dist.dir">Must set dist.dir</fail>
196 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
197 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
198 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
199 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
200 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
201 <fail unless="dist.war">Must set dist.war</fail>
202 <fail unless="j2ee.platform.classpath">
203 The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
204 Either open the project in the IDE and assign the server or setup the server classpath manually.
205 For example like this:
206 ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)
207 or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)
210 <target name="-init-macrodef-property">
211 <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
212 <attribute name="name"/>
213 <attribute name="value"/>
215 <property name="@{name}" value="${@{value}}"/>
219 <target name="-init-macrodef-javac">
220 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
221 <attribute default="${src.dir}" name="srcdir"/>
222 <attribute default="${build.classes.dir}" name="destdir"/>
223 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
224 <attribute default="${includes}" name="includes"/>
225 <attribute default="${excludes}" name="excludes"/>
226 <attribute default="${javac.debug}" name="debug"/>
227 <attribute default="${empty.dir}" name="gensrcdir"/>
228 <element name="customize" optional="true"/>
230 <property location="${build.dir}/empty" name="empty.dir"/>
231 <mkdir dir="${empty.dir}"/>
232 <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}">
234 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
239 <path path="@{classpath}"/>
241 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
242 <compilerarg line="${javac.compilerargs}"/>
248 <target name="-init-macrodef-junit">
249 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
250 <attribute default="${includes}" name="includes"/>
251 <attribute default="${excludes}" name="excludes"/>
252 <attribute default="**" name="testincludes"/>
254 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
255 <batchtest todir="${build.test.results.dir}">
256 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
257 <filename name="@{testincludes}"/>
261 <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
264 <propertyref prefix="test-sys-prop."/>
265 <mapper from="test-sys-prop.*" to="*" type="glob"/>
267 <formatter type="brief" usefile="false"/>
268 <formatter type="xml"/>
269 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
270 <jvmarg line="${runmain.jvmargs}"/>
275 <target name="-init-macrodef-java">
276 <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
277 <attribute default="${main.class}" name="classname"/>
278 <attribute default="${debug.classpath}" name="classpath"/>
279 <element name="customize" optional="true"/>
281 <java classname="@{classname}" fork="true">
282 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
283 <jvmarg line="${runmain.jvmargs}"/>
285 <path path="@{classpath}:${j2ee.platform.classpath}"/>
288 <propertyref prefix="run-sys-prop."/>
289 <mapper from="run-sys-prop.*" to="*" type="glob"/>
296 <target name="-init-macrodef-nbjsdebug">
297 <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
298 <attribute default="${client.url}" name="webUrl"/>
300 <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
304 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
305 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
306 <attribute default="${main.class}" name="name"/>
307 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
309 <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
311 <path path="@{classpath}"/>
316 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
317 <attribute default="${build.classes.dir}" name="dir"/>
320 <fileset dir="@{dir}" includes="${fix.classes}">
321 <include name="${fix.includes}*.class"/>
326 <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
332 <target name="-init-debug-args">
333 <property name="version-output" value="java version "${ant.java.version}"/>
334 <condition property="have-jdk-older-than-1.4">
336 <contains string="${version-output}" substring="java version "1.0"/>
337 <contains string="${version-output}" substring="java version "1.1"/>
338 <contains string="${version-output}" substring="java version "1.2"/>
339 <contains string="${version-output}" substring="java version "1.3"/>
342 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
343 <istrue value="${have-jdk-older-than-1.4}"/>
345 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
346 <os family="windows"/>
348 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
349 <isset property="debug.transport"/>
352 <target depends="-init-debug-args" name="-init-macrodef-debug">
353 <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
354 <attribute default="${main.class}" name="classname"/>
355 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
356 <attribute default="${application.args.param}" name="args"/>
357 <element name="customize" optional="true"/>
359 <java classname="@{classname}" fork="true">
360 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
361 <jvmarg line="${debug-args-line}"/>
362 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
363 <jvmarg line="${runmain.jvmargs}"/>
365 <path path="@{classpath}"/>
368 <propertyref prefix="run-sys-prop."/>
369 <mapper from="run-sys-prop.*" to="*" type="glob"/>
371 <arg line="@{args}"/>
377 <target name="-init-taskdefs">
378 <fail unless="libs.CopyLibs.classpath">
379 The libs.CopyLibs.classpath property is not set up.
380 This property must point to
381 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
382 of NetBeans IDE installation and is usually located at
383 <netbeans_installation>/java<version>/ant/extra folder.
384 Either open the project in the IDE and make sure CopyLibs library
385 exists or setup the property manually. For example like this:
386 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
388 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
390 <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"/>
394 <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps">
395 <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="jar">
396 <property name="deploy.on.save" value="false"/>
399 <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
400 <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="jar">
401 <property name="deploy.on.save" value="false"/>
404 <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
405 <target depends="init,deps-jar" name="-pre-pre-compile">
406 <mkdir dir="${build.classes.dir}"/>
408 <target name="-pre-compile">
409 <!-- Empty placeholder for easier customization. -->
410 <!-- You can override this target in the ../build.xml file. -->
412 <target name="-copy-webdir">
413 <copy todir="${build.web.dir}">
414 <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
416 <copy todir="${build.web.dir}/WEB-INF">
417 <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
420 <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">
421 <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
422 <copy todir="${build.classes.dir}">
423 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
426 <target if="has.custom.manifest" name="-copy-manifest">
427 <mkdir dir="${build.meta.inf.dir}"/>
428 <copy todir="${build.meta.inf.dir}">
429 <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
432 <target if="has.persistence.xml" name="-copy-persistence-xml">
433 <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
434 <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
435 <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
438 <target name="-post-compile">
439 <!-- Empty placeholder for easier customization. -->
440 <!-- You can override this target in the ../build.xml file. -->
442 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
443 <target name="-pre-compile-single">
444 <!-- Empty placeholder for easier customization. -->
445 <!-- You can override this target in the ../build.xml file. -->
447 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
448 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
449 <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
450 <copy todir="${build.classes.dir}">
451 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
454 <target name="-post-compile-single">
455 <!-- Empty placeholder for easier customization. -->
456 <!-- You can override this target in the ../build.xml file. -->
458 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
459 <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
460 <mkdir dir="${build.generated.dir}/src"/>
461 <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
462 <arg value="-uriroot"/>
463 <arg file="${basedir}/${build.web.dir}"/>
465 <arg file="${basedir}/${build.generated.dir}/src"/>
467 <arg value="-compilerSourceVM ${javac.source}"/>
468 <arg value="-compilerTargetVM ${javac.target}"/>
469 <arg value="-javaEncoding ${source.encoding}"/>
470 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
472 <mkdir dir="${build.generated.dir}/classes"/>
473 <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
475 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
476 <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
477 <mkdir dir="${build.generated.dir}/src"/>
478 <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
479 <arg value="-uriroot"/>
480 <arg file="${basedir}/${build.web.dir}"/>
482 <arg file="${basedir}/${build.generated.dir}/src"/>
484 <arg value="-jspc.files"/>
485 <arg path="${jsp.includes}"/>
486 <arg value="-compilerSourceVM ${javac.source}"/>
487 <arg value="-compilerTargetVM ${javac.target}"/>
488 <arg value="-javaEncoding ${source.encoding}"/>
489 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
491 <mkdir dir="${build.generated.dir}/classes"/>
492 <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
494 <patternset includes="${javac.jsp.includes}"/>
498 <target name="compile-single-jsp">
499 <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
500 <antcall target="-do-compile-single-jsp"/>
503 DIST BUILDING SECTION
505 <target name="-pre-dist">
506 <!-- Empty placeholder for easier customization. -->
507 <!-- You can override this target in the ../build.xml file. -->
509 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
510 <dirname file="${dist.war}" property="dist.jar.dir"/>
511 <mkdir dir="${dist.jar.dir}"/>
512 <jar compress="${jar.compress}" jarfile="${dist.war}">
513 <fileset dir="${build.web.dir}"/>
516 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
517 <dirname file="${dist.war}" property="dist.jar.dir"/>
518 <mkdir dir="${dist.jar.dir}"/>
519 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
520 <fileset dir="${build.web.dir}"/>
523 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
524 <dirname file="${dist.war}" property="dist.jar.dir"/>
525 <mkdir dir="${dist.jar.dir}"/>
526 <jar compress="${jar.compress}" jarfile="${dist.war}">
527 <fileset dir="${build.web.dir}"/>
530 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
531 <dirname file="${dist.war}" property="dist.jar.dir"/>
532 <mkdir dir="${dist.jar.dir}"/>
533 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
534 <fileset dir="${build.web.dir}"/>
537 <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
538 <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
539 <copyfiles files="${reference.nekurak_net-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
540 <mkdir dir="${build.web.dir}/META-INF"/>
541 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
543 <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
544 <copyfiles files="${reference.nekurak_net-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
546 <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
547 <delete dir="${build.web.dir}/WEB-INF/lib"/>
549 <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
550 <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
551 <mkdir dir="${dist.jar.dir}"/>
552 <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
553 <fileset dir="${build.web.dir}"/>
556 <target name="-post-dist">
557 <!-- Empty placeholder for easier customization. -->
558 <!-- You can override this target in the ../build.xml file. -->
560 <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
561 <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"/>
565 <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
566 <target name="-pre-run-deploy">
567 <!-- Empty placeholder for easier customization. -->
568 <!-- You can override this target in the ../build.xml file. -->
570 <target name="-post-run-deploy">
571 <!-- Empty placeholder for easier customization. -->
572 <!-- You can override this target in the ../build.xml file. -->
574 <target name="-pre-nbmodule-run-deploy">
575 <!-- Empty placeholder for easier customization. -->
576 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
578 <target name="-post-nbmodule-run-deploy">
579 <!-- Empty placeholder for easier customization. -->
580 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
582 <target name="-run-deploy-am">
583 <!-- Task to deploy to the Access Manager runtime. -->
585 <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">
588 <target if="netbeans.home" name="-run-deploy-nb">
589 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
591 <target name="-init-deploy-ant" unless="netbeans.home">
592 <property name="deploy.ant.archive" value="${dist.war}"/>
593 <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
594 <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
595 <property name="deploy.ant.enabled" value="true"/>
597 <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
598 <target if="netbeans.home" name="-run-undeploy-nb">
599 <fail message="Undeploy is not supported from within the IDE"/>
601 <target depends="init,-pre-dist,dist,-post-dist" name="verify">
602 <nbverify file="${dist.war}"/>
604 <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
605 <target if="do.display.browser" name="-init-display-browser">
606 <condition property="do.display.browser.nb">
607 <isset property="netbeans.home"/>
609 <condition property="do.display.browser.cl">
610 <isset property="deploy.ant.enabled"/>
613 <target if="do.display.browser.nb" name="-display-browser-nb">
614 <nbbrowse url="${client.url}"/>
616 <target if="do.display.browser.cl" name="-get-browser" unless="browser">
617 <condition property="browser" value="rundll32">
618 <os family="windows"/>
620 <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
621 <os family="windows"/>
623 <condition property="browser" value="/usr/bin/open">
626 <property environment="env"/>
627 <condition property="browser" value="${env.BROWSER}">
628 <isset property="env.BROWSER"/>
630 <condition property="browser" value="/usr/bin/firefox">
631 <available file="/usr/bin/firefox"/>
633 <condition property="browser" value="/usr/local/firefox/firefox">
634 <available file="/usr/local/firefox/firefox"/>
636 <condition property="browser" value="/usr/bin/mozilla">
637 <available file="/usr/bin/mozilla"/>
639 <condition property="browser" value="/usr/local/mozilla/mozilla">
640 <available file="/usr/local/mozilla/mozilla"/>
642 <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
643 <available file="/usr/sfw/lib/firefox/firefox"/>
645 <condition property="browser" value="/opt/csw/bin/firefox">
646 <available file="/opt/csw/bin/firefox"/>
648 <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
649 <available file="/usr/sfw/lib/mozilla/mozilla"/>
651 <condition property="browser" value="/opt/csw/bin/mozilla">
652 <available file="/opt/csw/bin/mozilla"/>
655 <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
656 <fail unless="browser">
657 Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
659 <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
660 <echo>Launching ${browse.url}</echo>
661 <exec executable="${browser}" spawn="true">
662 <arg line="${browser.args} ${browse.url}"/>
665 <target depends="init,-init-cos,compile-single" name="run-main">
666 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
667 <webproject1:java classname="${run.class}"/>
669 <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
670 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
671 <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
676 <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">
677 <nbstartserver debugmode="true"/>
678 <antcall target="connect-debugger"/>
679 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
680 <antcall target="debug-display-browser"/>
681 <antcall target="connect-client-debugger"/>
683 <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
684 <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
686 <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
689 <path path="${web.docbase.dir}"/>
693 <target if="do.display.browser.debug" name="debug-display-browser">
694 <nbbrowse url="${client.url}"/>
696 <target if="do.debug.client" name="connect-client-debugger">
697 <webproject1:nbjsdebugstart webUrl="${client.url}"/>
699 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
700 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
701 <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
703 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
704 <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
705 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
706 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
708 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
709 <webproject1:nbjpdastart name="${debug.class}"/>
711 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
712 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
713 <webproject1:debug classname="${debug.class}"/>
715 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
716 <target depends="init" name="-pre-debug-fix">
717 <fail unless="fix.includes">Must set fix.includes</fail>
718 <property name="javac.includes" value="${fix.includes}.java"/>
720 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
721 <webproject1:nbjpdareload/>
723 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
727 <target depends="init" name="javadoc-build">
728 <mkdir dir="${dist.javadoc.dir}"/>
729 <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}">
731 <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
733 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
734 <filename name="**/*.java"/>
736 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
737 <include name="**/*.java"/>
741 <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
742 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
744 <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
747 JUNIT COMPILATION SECTION
749 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
750 <mkdir dir="${build.test.classes.dir}"/>
751 <property name="j2ee.platform.embeddableejb.classpath" value=""/>
753 <target name="-pre-compile-test">
754 <!-- Empty placeholder for easier customization. -->
755 <!-- You can override this target in the ../build.xml file. -->
757 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
758 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
759 <copy todir="${build.test.classes.dir}">
760 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
763 <target name="-post-compile-test">
764 <!-- Empty placeholder for easier customization. -->
765 <!-- You can override this target in the ../build.xml file. -->
767 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
768 <target name="-pre-compile-test-single">
769 <!-- Empty placeholder for easier customization. -->
770 <!-- You can override this target in the ../build.xml file. -->
772 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
773 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
774 <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}"/>
775 <copy todir="${build.test.classes.dir}">
776 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
779 <target name="-post-compile-test-single">
780 <!-- Empty placeholder for easier customization. -->
781 <!-- You can override this target in the ../build.xml file. -->
783 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
786 JUNIT EXECUTION SECTION
788 <target depends="init" if="have.tests" name="-pre-test-run">
789 <mkdir dir="${build.test.results.dir}"/>
791 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
792 <webproject2:junit testincludes="**/*Test.java"/>
794 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
795 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
797 <target depends="init" if="have.tests" name="test-report"/>
798 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
799 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
800 <target depends="init" if="have.tests" name="-pre-test-run-single">
801 <mkdir dir="${build.test.results.dir}"/>
803 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
804 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
805 <webproject2:junit excludes="" includes="${test.includes}"/>
807 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
808 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
810 <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"/>
813 JUNIT DEBUGGING SECTION
815 <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
816 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
817 <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
818 <delete file="${test.report.file}"/>
819 <!-- must exist, otherwise the XML formatter would fail -->
820 <mkdir dir="${build.test.results.dir}"/>
821 <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}">
823 <arg value="showoutput=true"/>
824 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
825 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
829 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
830 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
832 <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
833 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
834 <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
836 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
841 <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps">
842 <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="clean"/>
844 <target depends="init" name="do-clean">
845 <condition property="build.dir.to.clean" value="${build.web.dir}">
846 <isset property="dist.ear.dir"/>
848 <property name="build.dir.to.clean" value="${build.web.dir}"/>
849 <delete includeEmptyDirs="true" quiet="true">
850 <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
852 <delete dir="${build.dir}"/>
853 <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
854 <delete dir="${dist.dir}"/>
856 <target depends="do-clean" if="status.clean-failed" name="check-clean">
857 <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
858 <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
860 <target depends="init" if="netbeans.home" name="undeploy-clean">
861 <nbundeploy failOnError="false" startServer="false"/>
863 <target name="-post-clean">
864 <!-- Empty placeholder for easier customization. -->
865 <!-- You can override this target in the ../build.xml file. -->
867 <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
868 <target depends="clean" description="Clean build products." name="clean-ear"/>