ZIP se zdrojáky – nebalit přebytečné věci z REST modulu.
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-rest-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"/>
130 <isfalse value="${directory.deployment.supported}"/>
131 <isset property="dist.ear.dir"/>
135 <condition property="do.tmp.war.package.without.custom.manifest">
138 <isset property="has.custom.manifest"/>
141 <isfalse value="${directory.deployment.supported}"/>
142 <isset property="dist.ear.dir"/>
146 <condition property="do.tmp.war.package">
148 <isfalse value="${directory.deployment.supported}"/>
149 <isset property="dist.ear.dir"/>
152 <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
153 <condition else="" property="application.args.param" value="${application.args}">
155 <isset property="application.args"/>
157 <equals arg1="${application.args}" arg2="" trim="true"/>
161 <property name="source.encoding" value="${file.encoding}"/>
162 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
164 <isset property="javadoc.encoding"/>
166 <equals arg1="${javadoc.encoding}" arg2=""/>
170 <property name="javadoc.encoding.used" value="${source.encoding}"/>
171 <property name="includes" value="**"/>
172 <property name="excludes" value=""/>
173 <property name="runmain.jvmargs" value=""/>
174 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
175 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
176 <length length="0" string="${endorsed.classpath}" when="greater"/>
179 <target depends="init" name="-init-cos" unless="deploy.on.save">
180 <condition property="deploy.on.save" value="true">
181 <istrue value="${j2ee.deploy.on.save}"/>
184 <target name="-post-init">
185 <!-- Empty placeholder for easier customization. -->
186 <!-- You can override this target in the ../build.xml file. -->
188 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
189 <fail unless="src.dir">Must set src.dir</fail>
190 <fail unless="test.src.dir">Must set test.src.dir</fail>
191 <fail unless="build.dir">Must set build.dir</fail>
192 <fail unless="build.web.dir">Must set build.web.dir</fail>
193 <fail unless="build.generated.dir">Must set build.generated.dir</fail>
194 <fail unless="dist.dir">Must set dist.dir</fail>
195 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
196 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
197 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
198 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
199 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
200 <fail unless="dist.war">Must set dist.war</fail>
201 <fail unless="j2ee.platform.classpath">
202 The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
203 Either open the project in the IDE and assign the server or setup the server classpath manually.
204 For example like this:
205 ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)
206 or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)
209 <target name="-init-macrodef-property">
210 <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
211 <attribute name="name"/>
212 <attribute name="value"/>
214 <property name="@{name}" value="${@{value}}"/>
218 <target name="-init-macrodef-javac">
219 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
220 <attribute default="${src.dir}" name="srcdir"/>
221 <attribute default="${build.classes.dir}" name="destdir"/>
222 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
223 <attribute default="${includes}" name="includes"/>
224 <attribute default="${excludes}" name="excludes"/>
225 <attribute default="${javac.debug}" name="debug"/>
226 <attribute default="${empty.dir}" name="gensrcdir"/>
227 <element name="customize" optional="true"/>
229 <property location="${build.dir}/empty" name="empty.dir"/>
230 <mkdir dir="${empty.dir}"/>
231 <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}">
233 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
238 <path path="@{classpath}"/>
240 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
241 <compilerarg line="${javac.compilerargs}"/>
247 <target name="-init-macrodef-junit">
248 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
249 <attribute default="${includes}" name="includes"/>
250 <attribute default="${excludes}" name="excludes"/>
251 <attribute default="**" name="testincludes"/>
253 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
254 <batchtest todir="${build.test.results.dir}">
255 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
256 <filename name="@{testincludes}"/>
260 <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
263 <propertyref prefix="test-sys-prop."/>
264 <mapper from="test-sys-prop.*" to="*" type="glob"/>
266 <formatter type="brief" usefile="false"/>
267 <formatter type="xml"/>
268 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
269 <jvmarg line="${runmain.jvmargs}"/>
274 <target name="-init-macrodef-java">
275 <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
276 <attribute default="${main.class}" name="classname"/>
277 <attribute default="${debug.classpath}" name="classpath"/>
278 <element name="customize" optional="true"/>
280 <java classname="@{classname}" fork="true">
281 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
282 <jvmarg line="${runmain.jvmargs}"/>
284 <path path="@{classpath}:${j2ee.platform.classpath}"/>
287 <propertyref prefix="run-sys-prop."/>
288 <mapper from="run-sys-prop.*" to="*" type="glob"/>
295 <target name="-init-macrodef-nbjsdebug">
296 <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
297 <attribute default="${client.url}" name="webUrl"/>
299 <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
303 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
304 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
305 <attribute default="${main.class}" name="name"/>
306 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
308 <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
310 <path path="@{classpath}"/>
315 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
316 <attribute default="${build.classes.dir}" name="dir"/>
319 <fileset dir="@{dir}" includes="${fix.classes}">
320 <include name="${fix.includes}*.class"/>
325 <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
331 <target name="-init-debug-args">
332 <property name="version-output" value="java version "${ant.java.version}"/>
333 <condition property="have-jdk-older-than-1.4">
335 <contains string="${version-output}" substring="java version "1.0"/>
336 <contains string="${version-output}" substring="java version "1.1"/>
337 <contains string="${version-output}" substring="java version "1.2"/>
338 <contains string="${version-output}" substring="java version "1.3"/>
341 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
342 <istrue value="${have-jdk-older-than-1.4}"/>
344 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
345 <os family="windows"/>
347 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
348 <isset property="debug.transport"/>
351 <target depends="-init-debug-args" name="-init-macrodef-debug">
352 <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
353 <attribute default="${main.class}" name="classname"/>
354 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
355 <attribute default="${application.args.param}" name="args"/>
356 <element name="customize" optional="true"/>
358 <java classname="@{classname}" fork="true">
359 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
360 <jvmarg line="${debug-args-line}"/>
361 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
362 <jvmarg line="${runmain.jvmargs}"/>
364 <path path="@{classpath}"/>
367 <propertyref prefix="run-sys-prop."/>
368 <mapper from="run-sys-prop.*" to="*" type="glob"/>
370 <arg line="@{args}"/>
376 <target name="-init-taskdefs">
377 <fail unless="libs.CopyLibs.classpath">
378 The libs.CopyLibs.classpath property is not set up.
379 This property must point to
380 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
381 of NetBeans IDE installation and is usually located at
382 <netbeans_installation>/java<version>/ant/extra folder.
383 Either open the project in the IDE and make sure CopyLibs library
384 exists or setup the property manually. For example like this:
385 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
387 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
389 <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"/>
393 <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
394 <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
395 <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
396 <target depends="init,deps-jar" name="-pre-pre-compile">
397 <mkdir dir="${build.classes.dir}"/>
399 <target name="-pre-compile">
400 <!-- Empty placeholder for easier customization. -->
401 <!-- You can override this target in the ../build.xml file. -->
403 <target name="-copy-webdir">
404 <copy todir="${build.web.dir}">
405 <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
407 <copy todir="${build.web.dir}/WEB-INF">
408 <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
411 <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">
412 <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
413 <copy todir="${build.classes.dir}">
414 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
417 <target if="has.custom.manifest" name="-copy-manifest">
418 <mkdir dir="${build.meta.inf.dir}"/>
419 <copy todir="${build.meta.inf.dir}">
420 <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
423 <target if="has.persistence.xml" name="-copy-persistence-xml">
424 <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
425 <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
426 <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
429 <target name="-post-compile">
430 <!-- Empty placeholder for easier customization. -->
431 <!-- You can override this target in the ../build.xml file. -->
433 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
434 <target name="-pre-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" name="-do-compile-single">
439 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
440 <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
441 <copy todir="${build.classes.dir}">
442 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
445 <target name="-post-compile-single">
446 <!-- Empty placeholder for easier customization. -->
447 <!-- You can override this target in the ../build.xml file. -->
449 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
450 <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
451 <mkdir dir="${build.generated.dir}/src"/>
452 <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
453 <arg value="-uriroot"/>
454 <arg file="${basedir}/${build.web.dir}"/>
456 <arg file="${basedir}/${build.generated.dir}/src"/>
458 <arg value="-compilerSourceVM ${javac.source}"/>
459 <arg value="-compilerTargetVM ${javac.target}"/>
460 <arg value="-javaEncoding ${source.encoding}"/>
461 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
463 <mkdir dir="${build.generated.dir}/classes"/>
464 <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
466 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
467 <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
468 <mkdir dir="${build.generated.dir}/src"/>
469 <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
470 <arg value="-uriroot"/>
471 <arg file="${basedir}/${build.web.dir}"/>
473 <arg file="${basedir}/${build.generated.dir}/src"/>
475 <arg value="-jspc.files"/>
476 <arg path="${jsp.includes}"/>
477 <arg value="-compilerSourceVM ${javac.source}"/>
478 <arg value="-compilerTargetVM ${javac.target}"/>
479 <arg value="-javaEncoding ${source.encoding}"/>
480 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
482 <mkdir dir="${build.generated.dir}/classes"/>
483 <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
485 <patternset includes="${javac.jsp.includes}"/>
489 <target name="compile-single-jsp">
490 <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
491 <antcall target="-do-compile-single-jsp"/>
494 DIST BUILDING SECTION
496 <target name="-pre-dist">
497 <!-- Empty placeholder for easier customization. -->
498 <!-- You can override this target in the ../build.xml file. -->
500 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
501 <dirname file="${dist.war}" property="dist.jar.dir"/>
502 <mkdir dir="${dist.jar.dir}"/>
503 <jar compress="${jar.compress}" jarfile="${dist.war}">
504 <fileset dir="${build.web.dir}"/>
507 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
508 <dirname file="${dist.war}" property="dist.jar.dir"/>
509 <mkdir dir="${dist.jar.dir}"/>
510 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
511 <fileset dir="${build.web.dir}"/>
514 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
515 <dirname file="${dist.war}" property="dist.jar.dir"/>
516 <mkdir dir="${dist.jar.dir}"/>
517 <jar compress="${jar.compress}" jarfile="${dist.war}">
518 <fileset dir="${build.web.dir}"/>
521 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
522 <dirname file="${dist.war}" property="dist.jar.dir"/>
523 <mkdir dir="${dist.jar.dir}"/>
524 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
525 <fileset dir="${build.web.dir}"/>
528 <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
529 <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
530 <mkdir dir="${build.web.dir}/META-INF"/>
531 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
533 <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"/>
534 <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
535 <delete dir="${build.web.dir}/WEB-INF/lib"/>
537 <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
538 <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
539 <mkdir dir="${dist.jar.dir}"/>
540 <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
541 <fileset dir="${build.web.dir}"/>
544 <target name="-post-dist">
545 <!-- Empty placeholder for easier customization. -->
546 <!-- You can override this target in the ../build.xml file. -->
548 <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
549 <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"/>
553 <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
554 <target name="-pre-run-deploy">
555 <!-- Empty placeholder for easier customization. -->
556 <!-- You can override this target in the ../build.xml file. -->
558 <target name="-post-run-deploy">
559 <!-- Empty placeholder for easier customization. -->
560 <!-- You can override this target in the ../build.xml file. -->
562 <target name="-pre-nbmodule-run-deploy">
563 <!-- Empty placeholder for easier customization. -->
564 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
566 <target name="-post-nbmodule-run-deploy">
567 <!-- Empty placeholder for easier customization. -->
568 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
570 <target name="-run-deploy-am">
571 <!-- Task to deploy to the Access Manager runtime. -->
573 <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">
576 <target if="netbeans.home" name="-run-deploy-nb">
577 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
579 <target name="-init-deploy-ant" unless="netbeans.home">
580 <property name="deploy.ant.archive" value="${dist.war}"/>
581 <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
582 <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
583 <property name="deploy.ant.enabled" value="true"/>
585 <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
586 <target if="netbeans.home" name="-run-undeploy-nb">
587 <fail message="Undeploy is not supported from within the IDE"/>
589 <target depends="init,-pre-dist,dist,-post-dist" name="verify">
590 <nbverify file="${dist.war}"/>
592 <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
593 <target if="do.display.browser" name="-init-display-browser">
594 <condition property="do.display.browser.nb">
595 <isset property="netbeans.home"/>
597 <condition property="do.display.browser.cl">
598 <isset property="deploy.ant.enabled"/>
601 <target if="do.display.browser.nb" name="-display-browser-nb">
602 <nbbrowse url="${client.url}"/>
604 <target if="do.display.browser.cl" name="-get-browser" unless="browser">
605 <condition property="browser" value="rundll32">
606 <os family="windows"/>
608 <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
609 <os family="windows"/>
611 <condition property="browser" value="/usr/bin/open">
614 <property environment="env"/>
615 <condition property="browser" value="${env.BROWSER}">
616 <isset property="env.BROWSER"/>
618 <condition property="browser" value="/usr/bin/firefox">
619 <available file="/usr/bin/firefox"/>
621 <condition property="browser" value="/usr/local/firefox/firefox">
622 <available file="/usr/local/firefox/firefox"/>
624 <condition property="browser" value="/usr/bin/mozilla">
625 <available file="/usr/bin/mozilla"/>
627 <condition property="browser" value="/usr/local/mozilla/mozilla">
628 <available file="/usr/local/mozilla/mozilla"/>
630 <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
631 <available file="/usr/sfw/lib/firefox/firefox"/>
633 <condition property="browser" value="/opt/csw/bin/firefox">
634 <available file="/opt/csw/bin/firefox"/>
636 <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
637 <available file="/usr/sfw/lib/mozilla/mozilla"/>
639 <condition property="browser" value="/opt/csw/bin/mozilla">
640 <available file="/opt/csw/bin/mozilla"/>
643 <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
644 <fail unless="browser">
645 Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
647 <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
648 <echo>Launching ${browse.url}</echo>
649 <exec executable="${browser}" spawn="true">
650 <arg line="${browser.args} ${browse.url}"/>
653 <target depends="init,-init-cos,compile-single" name="run-main">
654 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
655 <webproject1:java classname="${run.class}"/>
657 <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
658 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
659 <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
664 <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">
665 <nbstartserver debugmode="true"/>
666 <antcall target="connect-debugger"/>
667 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
668 <antcall target="debug-display-browser"/>
669 <antcall target="connect-client-debugger"/>
671 <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
672 <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
674 <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
677 <path path="${web.docbase.dir}"/>
681 <target if="do.display.browser.debug" name="debug-display-browser">
682 <nbbrowse url="${client.url}"/>
684 <target if="do.debug.client" name="connect-client-debugger">
685 <webproject1:nbjsdebugstart webUrl="${client.url}"/>
687 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
688 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
689 <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
691 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
692 <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
693 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
694 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
696 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
697 <webproject1:nbjpdastart name="${debug.class}"/>
699 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
700 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
701 <webproject1:debug classname="${debug.class}"/>
703 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
704 <target depends="init" name="-pre-debug-fix">
705 <fail unless="fix.includes">Must set fix.includes</fail>
706 <property name="javac.includes" value="${fix.includes}.java"/>
708 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
709 <webproject1:nbjpdareload/>
711 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
715 <target depends="init" name="javadoc-build">
716 <mkdir dir="${dist.javadoc.dir}"/>
717 <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}">
719 <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
721 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
722 <filename name="**/*.java"/>
724 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
725 <include name="**/*.java"/>
729 <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
730 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
732 <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
735 JUNIT COMPILATION SECTION
737 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
738 <mkdir dir="${build.test.classes.dir}"/>
739 <property name="j2ee.platform.embeddableejb.classpath" value=""/>
741 <target name="-pre-compile-test">
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" if="have.tests" name="-do-compile-test">
746 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
747 <copy todir="${build.test.classes.dir}">
748 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
751 <target name="-post-compile-test">
752 <!-- Empty placeholder for easier customization. -->
753 <!-- You can override this target in the ../build.xml file. -->
755 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
756 <target name="-pre-compile-test-single">
757 <!-- Empty placeholder for easier customization. -->
758 <!-- You can override this target in the ../build.xml file. -->
760 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
761 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
762 <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}"/>
763 <copy todir="${build.test.classes.dir}">
764 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
767 <target name="-post-compile-test-single">
768 <!-- Empty placeholder for easier customization. -->
769 <!-- You can override this target in the ../build.xml file. -->
771 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
774 JUNIT EXECUTION SECTION
776 <target depends="init" if="have.tests" name="-pre-test-run">
777 <mkdir dir="${build.test.results.dir}"/>
779 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
780 <webproject2:junit testincludes="**/*Test.java"/>
782 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
783 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
785 <target depends="init" if="have.tests" name="test-report"/>
786 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
787 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
788 <target depends="init" if="have.tests" name="-pre-test-run-single">
789 <mkdir dir="${build.test.results.dir}"/>
791 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
792 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
793 <webproject2:junit excludes="" includes="${test.includes}"/>
795 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
796 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
798 <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"/>
801 JUNIT DEBUGGING SECTION
803 <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
804 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
805 <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
806 <delete file="${test.report.file}"/>
807 <!-- must exist, otherwise the XML formatter would fail -->
808 <mkdir dir="${build.test.results.dir}"/>
809 <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}">
811 <arg value="showoutput=true"/>
812 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
813 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
817 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
818 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
820 <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
821 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
822 <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
824 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
829 <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
830 <target depends="init" name="do-clean">
831 <condition property="build.dir.to.clean" value="${build.web.dir}">
832 <isset property="dist.ear.dir"/>
834 <property name="build.dir.to.clean" value="${build.web.dir}"/>
835 <delete includeEmptyDirs="true" quiet="true">
836 <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
838 <delete dir="${build.dir}"/>
839 <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
840 <delete dir="${dist.dir}"/>
842 <target depends="do-clean" if="status.clean-failed" name="check-clean">
843 <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
844 <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
846 <target depends="init" if="netbeans.home" name="undeploy-clean">
847 <nbundeploy failOnError="false" startServer="false"/>
849 <target name="-post-clean">
850 <!-- Empty placeholder for easier customization. -->
851 <!-- You can override this target in the ../build.xml file. -->
853 <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
854 <target depends="clean" description="Clean build products." name="clean-ear"/>