JSP → JSPX – zbavili jsme se starého zápisu JSP i u hlavní stránky (doctype), teď už máme vše v XML syntaxi.
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-web-impl">
21 <import file="ant-deploy.xml"/>
22 <fail message="Please build using Ant 1.7.1 or higher.">
25 <antversion atleast="1.7.1"/>
29 <target depends="dist,javadoc" description="Build whole project." name="default"/>
31 INITIALIZATION SECTION
33 <target name="-pre-init">
34 <!-- Empty placeholder for easier customization. -->
35 <!-- You can override this target in the ../build.xml file. -->
37 <target depends="-pre-init" name="-init-private">
38 <property file="nbproject/private/private.properties"/>
40 <target depends="-pre-init,-init-private" name="-init-user">
41 <property file="${user.properties.file}"/>
42 <!-- The two properties below are usually overridden -->
43 <!-- by the active platform. Just a fallback. -->
44 <property name="default.javac.source" value="1.4"/>
45 <property name="default.javac.target" value="1.4"/>
47 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
48 <property file="nbproject/project.properties"/>
50 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
51 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
52 <condition property="have.tests">
54 <available file="${test.src.dir}"/>
57 <condition property="have.sources">
59 <available file="${src.dir}"/>
62 <condition property="netbeans.home+have.tests">
64 <isset property="netbeans.home"/>
65 <isset property="have.tests"/>
68 <condition property="no.javadoc.preview">
69 <isfalse value="${javadoc.preview}"/>
71 <property name="javac.compilerargs" value=""/>
72 <condition property="no.deps">
74 <istrue value="${no.dependencies}"/>
77 <condition property="no.dist.ear.dir">
79 <isset property="dist.ear.dir"/>
82 <property name="build.web.excludes" value="${build.classes.excludes}"/>
83 <condition property="do.compile.jsps">
84 <istrue value="${compile.jsps}"/>
86 <condition property="do.debug.server">
89 <isset property="debug.server"/>
91 <istrue value="${debug.server}"/>
94 <istrue value="${debug.server}"/>
97 <istrue value="${debug.client}"/>
102 <condition property="do.debug.client">
103 <istrue value="${debug.client}"/>
105 <condition property="do.display.browser">
106 <istrue value="${display.browser}"/>
108 <condition property="do.display.browser.debug">
110 <isset property="do.display.browser"/>
112 <isset property="do.debug.client"/>
116 <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
117 <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
118 <condition property="do.war.package.with.custom.manifest">
119 <isset property="has.custom.manifest"/>
121 <condition property="do.war.package.without.custom.manifest">
123 <isset property="has.custom.manifest"/>
126 <condition property="do.tmp.war.package.with.custom.manifest">
128 <isset property="has.custom.manifest"/>
129 <isfalse value="${directory.deployment.supported}"/>
132 <condition property="do.tmp.war.package.without.custom.manifest">
135 <isset property="has.custom.manifest"/>
137 <isfalse value="${directory.deployment.supported}"/>
140 <condition property="do.tmp.war.package">
141 <isfalse value="${directory.deployment.supported}"/>
143 <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
144 <condition else="" property="application.args.param" value="${application.args}">
146 <isset property="application.args"/>
148 <equals arg1="${application.args}" arg2="" trim="true"/>
152 <property name="source.encoding" value="${file.encoding}"/>
153 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
155 <isset property="javadoc.encoding"/>
157 <equals arg1="${javadoc.encoding}" arg2=""/>
161 <property name="javadoc.encoding.used" value="${source.encoding}"/>
162 <property name="includes" value="**"/>
163 <property name="excludes" value=""/>
164 <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
166 <isset property="jaxws.endorsed.dir"/>
167 <available file="nbproject/jaxws-build.xml"/>
170 <property name="runmain.jvmargs" value=""/>
172 <target depends="init" name="-init-cos" unless="deploy.on.save">
173 <condition property="deploy.on.save" value="true">
174 <istrue value="${j2ee.deploy.on.save}"/>
177 <target name="-post-init">
178 <!-- Empty placeholder for easier customization. -->
179 <!-- You can override this target in the ../build.xml file. -->
181 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
182 <fail unless="src.dir">Must set src.dir</fail>
183 <fail unless="test.src.dir">Must set test.src.dir</fail>
184 <fail unless="build.dir">Must set build.dir</fail>
185 <fail unless="build.web.dir">Must set build.web.dir</fail>
186 <fail unless="build.generated.dir">Must set build.generated.dir</fail>
187 <fail unless="dist.dir">Must set dist.dir</fail>
188 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
189 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
190 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
191 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
192 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
193 <fail unless="dist.war">Must set dist.war</fail>
194 <fail unless="j2ee.platform.classpath">
195 The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
196 Either open the project in the IDE and assign the server or setup the server classpath manually.
197 For example like this:
198 ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)
199 or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)
202 <target name="-init-macrodef-property">
203 <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
204 <attribute name="name"/>
205 <attribute name="value"/>
207 <property name="@{name}" value="${@{value}}"/>
211 <target name="-init-macrodef-javac">
212 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
213 <attribute default="${src.dir}" name="srcdir"/>
214 <attribute default="${build.classes.dir}" name="destdir"/>
215 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
216 <attribute default="${includes}" name="includes"/>
217 <attribute default="${excludes}" name="excludes"/>
218 <attribute default="${javac.debug}" name="debug"/>
219 <attribute default="${empty.dir}" name="gensrcdir"/>
220 <element name="customize" optional="true"/>
222 <property location="${build.dir}/empty" name="empty.dir"/>
223 <mkdir dir="${empty.dir}"/>
224 <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}">
226 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
231 <path path="@{classpath}"/>
233 <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
239 <target name="-init-macrodef-junit">
240 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
241 <attribute default="${includes}" name="includes"/>
242 <attribute default="${excludes}" name="excludes"/>
243 <attribute default="**" name="testincludes"/>
245 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
246 <batchtest todir="${build.test.results.dir}">
247 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
248 <filename name="@{testincludes}"/>
252 <path path="${run.test.classpath}:${j2ee.platform.classpath}"/>
255 <propertyref prefix="test-sys-prop."/>
256 <mapper from="test-sys-prop.*" to="*" type="glob"/>
258 <formatter type="brief" usefile="false"/>
259 <formatter type="xml"/>
260 <jvmarg line="${runmain.jvmargs}"/>
265 <target name="-init-macrodef-java">
266 <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
267 <attribute default="${main.class}" name="classname"/>
268 <attribute default="${debug.classpath}" name="classpath"/>
269 <element name="customize" optional="true"/>
271 <java classname="@{classname}" fork="true">
272 <jvmarg line="${runmain.jvmargs}"/>
274 <path path="@{classpath}:${j2ee.platform.classpath}"/>
277 <propertyref prefix="run-sys-prop."/>
278 <mapper from="run-sys-prop.*" to="*" type="glob"/>
285 <target name="-init-macrodef-nbjsdebug">
286 <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
287 <attribute default="${client.url}" name="webUrl"/>
289 <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
293 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
294 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
295 <attribute default="${main.class}" name="name"/>
296 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
298 <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
300 <path path="@{classpath}"/>
305 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
306 <attribute default="${build.classes.dir}" name="dir"/>
309 <fileset dir="@{dir}" includes="${fix.classes}">
310 <include name="${fix.includes}*.class"/>
315 <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
321 <target name="-init-debug-args">
322 <property name="version-output" value="java version "${ant.java.version}"/>
323 <condition property="have-jdk-older-than-1.4">
325 <contains string="${version-output}" substring="java version "1.0"/>
326 <contains string="${version-output}" substring="java version "1.1"/>
327 <contains string="${version-output}" substring="java version "1.2"/>
328 <contains string="${version-output}" substring="java version "1.3"/>
331 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
332 <istrue value="${have-jdk-older-than-1.4}"/>
334 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
335 <os family="windows"/>
337 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
338 <isset property="debug.transport"/>
341 <target depends="-init-debug-args" name="-init-macrodef-debug">
342 <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
343 <attribute default="${main.class}" name="classname"/>
344 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
345 <attribute default="${application.args.param}" name="args"/>
346 <element name="customize" optional="true"/>
348 <java classname="@{classname}" fork="true">
349 <jvmarg line="${debug-args-line}"/>
350 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
351 <jvmarg line="${runmain.jvmargs}"/>
353 <path path="@{classpath}"/>
356 <propertyref prefix="run-sys-prop."/>
357 <mapper from="run-sys-prop.*" to="*" type="glob"/>
359 <arg line="@{args}"/>
365 <target name="-init-taskdefs">
366 <fail unless="libs.CopyLibs.classpath">
367 The libs.CopyLibs.classpath property is not set up.
368 This property must point to
369 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
370 of NetBeans IDE installation and is usually located at
371 <netbeans_installation>/java<version>/ant/extra folder.
372 Either open the project in the IDE and make sure CopyLibs library
373 exists or setup the property manually. For example like this:
374 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
376 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
378 <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"/>
382 <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
383 <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
384 <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
385 <target depends="init,deps-jar" name="-pre-pre-compile">
386 <mkdir dir="${build.classes.dir}"/>
388 <target name="-pre-compile">
389 <!-- Empty placeholder for easier customization. -->
390 <!-- You can override this target in the ../build.xml file. -->
392 <target name="-copy-webdir">
393 <copy todir="${build.web.dir}">
394 <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
396 <copy todir="${build.web.dir}/WEB-INF">
397 <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
400 <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">
401 <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
402 <copy todir="${build.classes.dir}">
403 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
406 <target if="has.custom.manifest" name="-copy-manifest">
407 <mkdir dir="${build.meta.inf.dir}"/>
408 <copy todir="${build.meta.inf.dir}">
409 <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
412 <target if="has.persistence.xml" name="-copy-persistence-xml">
413 <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
414 <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
415 <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
418 <target name="-post-compile">
419 <!-- Empty placeholder for easier customization. -->
420 <!-- You can override this target in the ../build.xml file. -->
422 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
423 <target name="-pre-compile-single">
424 <!-- Empty placeholder for easier customization. -->
425 <!-- You can override this target in the ../build.xml file. -->
427 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
428 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
429 <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
430 <copy todir="${build.classes.dir}">
431 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
434 <target name="-post-compile-single">
435 <!-- Empty placeholder for easier customization. -->
436 <!-- You can override this target in the ../build.xml file. -->
438 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
439 <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
440 <mkdir dir="${build.generated.dir}/src"/>
441 <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
442 <arg value="-uriroot"/>
443 <arg file="${basedir}/${build.web.dir}"/>
445 <arg file="${basedir}/${build.generated.dir}/src"/>
447 <arg value="-compilerSourceVM ${javac.source}"/>
448 <arg value="-compilerTargetVM ${javac.target}"/>
449 <arg value="-javaEncoding ${source.encoding}"/>
450 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
452 <mkdir dir="${build.generated.dir}/classes"/>
453 <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
455 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
456 <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
457 <mkdir dir="${build.generated.dir}/src"/>
458 <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
459 <arg value="-uriroot"/>
460 <arg file="${basedir}/${build.web.dir}"/>
462 <arg file="${basedir}/${build.generated.dir}/src"/>
464 <arg value="-jspc.files"/>
465 <arg path="${jsp.includes}"/>
466 <arg value="-compilerSourceVM ${javac.source}"/>
467 <arg value="-compilerTargetVM ${javac.target}"/>
468 <arg value="-javaEncoding ${source.encoding}"/>
469 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
471 <mkdir dir="${build.generated.dir}/classes"/>
472 <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
474 <patternset includes="${javac.jsp.includes}"/>
478 <target name="compile-single-jsp">
479 <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
480 <antcall target="-do-compile-single-jsp"/>
483 DIST BUILDING SECTION
485 <target name="-pre-dist">
486 <!-- Empty placeholder for easier customization. -->
487 <!-- You can override this target in the ../build.xml file. -->
489 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
490 <dirname file="${dist.war}" property="dist.jar.dir"/>
491 <mkdir dir="${dist.jar.dir}"/>
492 <jar compress="${jar.compress}" jarfile="${dist.war}">
493 <fileset dir="${build.web.dir}"/>
496 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
497 <dirname file="${dist.war}" property="dist.jar.dir"/>
498 <mkdir dir="${dist.jar.dir}"/>
499 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
500 <fileset dir="${build.web.dir}"/>
503 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
504 <dirname file="${dist.war}" property="dist.jar.dir"/>
505 <mkdir dir="${dist.jar.dir}"/>
506 <jar compress="${jar.compress}" jarfile="${dist.war}">
507 <fileset dir="${build.web.dir}"/>
510 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
511 <dirname file="${dist.war}" property="dist.jar.dir"/>
512 <mkdir dir="${dist.jar.dir}"/>
513 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
514 <fileset dir="${build.web.dir}"/>
517 <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
518 <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
519 <mkdir dir="${build.web.dir}/META-INF"/>
520 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
522 <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"/>
523 <target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
524 <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
525 <mkdir dir="${dist.jar.dir}"/>
526 <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
527 <fileset dir="${build.web.dir}"/>
530 <target name="-post-dist">
531 <!-- Empty placeholder for easier customization. -->
532 <!-- You can override this target in the ../build.xml file. -->
534 <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
535 <target depends="init,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
539 <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
540 <target name="-pre-run-deploy">
541 <!-- Empty placeholder for easier customization. -->
542 <!-- You can override this target in the ../build.xml file. -->
544 <target name="-post-run-deploy">
545 <!-- Empty placeholder for easier customization. -->
546 <!-- You can override this target in the ../build.xml file. -->
548 <target name="-pre-nbmodule-run-deploy">
549 <!-- Empty placeholder for easier customization. -->
550 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
552 <target name="-post-nbmodule-run-deploy">
553 <!-- Empty placeholder for easier customization. -->
554 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
556 <target name="-run-deploy-am">
557 <!-- Task to deploy to the Access Manager runtime. -->
559 <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">
562 <target if="netbeans.home" name="-run-deploy-nb">
563 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
565 <target name="-init-deploy-ant" unless="netbeans.home">
566 <property name="deploy.ant.archive" value="${dist.war}"/>
567 <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
568 <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
569 <property name="deploy.ant.enabled" value="true"/>
571 <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
572 <target if="netbeans.home" name="-run-undeploy-nb">
573 <fail message="Undeploy is not supported from within the IDE"/>
575 <target depends="init,-pre-dist,dist,-post-dist" name="verify">
576 <nbverify file="${dist.war}"/>
578 <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
579 <target if="do.display.browser" name="-init-display-browser">
580 <condition property="do.display.browser.nb">
581 <isset property="netbeans.home"/>
583 <condition property="do.display.browser.cl">
584 <isset property="deploy.ant.enabled"/>
587 <target if="do.display.browser.nb" name="-display-browser-nb">
588 <nbbrowse url="${client.url}"/>
590 <target if="do.display.browser.cl" name="-get-browser" unless="browser">
591 <condition property="browser" value="rundll32">
592 <os family="windows"/>
594 <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
595 <os family="windows"/>
597 <condition property="browser" value="/usr/bin/open">
600 <property environment="env"/>
601 <condition property="browser" value="${env.BROWSER}">
602 <isset property="env.BROWSER"/>
604 <condition property="browser" value="/usr/bin/firefox">
605 <available file="/usr/bin/firefox"/>
607 <condition property="browser" value="/usr/local/firefox/firefox">
608 <available file="/usr/local/firefox/firefox"/>
610 <condition property="browser" value="/usr/bin/mozilla">
611 <available file="/usr/bin/mozilla"/>
613 <condition property="browser" value="/usr/local/mozilla/mozilla">
614 <available file="/usr/local/mozilla/mozilla"/>
616 <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
617 <available file="/usr/sfw/lib/firefox/firefox"/>
619 <condition property="browser" value="/opt/csw/bin/firefox">
620 <available file="/opt/csw/bin/firefox"/>
622 <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
623 <available file="/usr/sfw/lib/mozilla/mozilla"/>
625 <condition property="browser" value="/opt/csw/bin/mozilla">
626 <available file="/opt/csw/bin/mozilla"/>
629 <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
630 <fail unless="browser">
631 Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
633 <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
634 <echo>Launching ${browse.url}</echo>
635 <exec executable="${browser}" spawn="true">
636 <arg line="${browser.args} ${browse.url}"/>
639 <target depends="init,-init-cos,compile-single" name="run-main">
640 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
641 <webproject1:java classname="${run.class}"/>
643 <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
644 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
645 <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
650 <target depends="init,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">
651 <nbstartserver debugmode="true"/>
652 <antcall target="connect-debugger"/>
653 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
654 <antcall target="debug-display-browser"/>
655 <antcall target="connect-client-debugger"/>
657 <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
658 <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
660 <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
663 <path path="${web.docbase.dir}"/>
667 <target if="do.display.browser.debug" name="debug-display-browser">
668 <nbbrowse url="${client.url}"/>
670 <target if="do.debug.client" name="connect-client-debugger">
671 <webproject1:nbjsdebugstart webUrl="${client.url}"/>
673 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
674 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
675 <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
677 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
678 <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
679 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
680 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
682 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
683 <webproject1:nbjpdastart name="${debug.class}"/>
685 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
686 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
687 <webproject1:debug classname="${debug.class}"/>
689 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
690 <target depends="init" name="-pre-debug-fix">
691 <fail unless="fix.includes">Must set fix.includes</fail>
692 <property name="javac.includes" value="${fix.includes}.java"/>
694 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
695 <webproject1:nbjpdareload/>
697 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
701 <target depends="init" name="javadoc-build">
702 <mkdir dir="${dist.javadoc.dir}"/>
703 <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}">
705 <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
707 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
708 <filename name="**/*.java"/>
710 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
711 <include name="**/*.java"/>
715 <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
716 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
718 <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
721 JUNIT COMPILATION SECTION
723 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
724 <mkdir dir="${build.test.classes.dir}"/>
726 <target name="-pre-compile-test">
727 <!-- Empty placeholder for easier customization. -->
728 <!-- You can override this target in the ../build.xml file. -->
730 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
731 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
732 <copy todir="${build.test.classes.dir}">
733 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
736 <target name="-post-compile-test">
737 <!-- Empty placeholder for easier customization. -->
738 <!-- You can override this target in the ../build.xml file. -->
740 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
741 <target name="-pre-compile-test-single">
742 <!-- Empty placeholder for easier customization. -->
743 <!-- You can override this target in the ../build.xml file. -->
745 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
746 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
747 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
748 <copy todir="${build.test.classes.dir}">
749 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
752 <target name="-post-compile-test-single">
753 <!-- Empty placeholder for easier customization. -->
754 <!-- You can override this target in the ../build.xml file. -->
756 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
759 JUNIT EXECUTION SECTION
761 <target depends="init" if="have.tests" name="-pre-test-run">
762 <mkdir dir="${build.test.results.dir}"/>
764 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
765 <webproject2:junit testincludes="**/*Test.java"/>
767 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
768 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
770 <target depends="init" if="have.tests" name="test-report"/>
771 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
772 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
773 <target depends="init" if="have.tests" name="-pre-test-run-single">
774 <mkdir dir="${build.test.results.dir}"/>
776 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
777 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
778 <webproject2:junit excludes="" includes="${test.includes}"/>
780 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
781 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
783 <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"/>
786 JUNIT DEBUGGING SECTION
788 <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
789 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
790 <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
791 <delete file="${test.report.file}"/>
792 <!-- must exist, otherwise the XML formatter would fail -->
793 <mkdir dir="${build.test.results.dir}"/>
794 <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}">
796 <arg value="showoutput=true"/>
797 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
798 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
802 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
803 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
805 <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
806 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
807 <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
809 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
814 <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
815 <target depends="init" name="do-clean">
816 <condition property="build.dir.to.clean" value="${build.web.dir}">
817 <isset property="dist.ear.dir"/>
819 <property name="build.dir.to.clean" value="${build.web.dir}"/>
820 <delete includeEmptyDirs="true" quiet="true">
821 <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
823 <delete dir="${build.dir}"/>
824 <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
825 <delete dir="${dist.dir}"/>
827 <target depends="do-clean" if="status.clean-failed" name="check-clean">
828 <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
829 <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
831 <target depends="init" if="netbeans.home" name="undeploy-clean">
832 <nbundeploy failOnError="false" startServer="false"/>
834 <target name="-post-clean">
835 <!-- Empty placeholder for easier customization. -->
836 <!-- You can override this target in the ../build.xml file. -->
838 <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
839 <target depends="clean" description="Clean build products." name="clean-ear"/>