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="sql-vyuka-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 <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="jar">
384 <property name="deploy.on.save" value="false"/>
387 <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
388 <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="jar">
389 <property name="deploy.on.save" value="false"/>
392 <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
393 <target depends="init,deps-jar" name="-pre-pre-compile">
394 <mkdir dir="${build.classes.dir}"/>
396 <target name="-pre-compile">
397 <!-- Empty placeholder for easier customization. -->
398 <!-- You can override this target in the ../build.xml file. -->
400 <target name="-copy-webdir">
401 <copy todir="${build.web.dir}">
402 <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
404 <copy todir="${build.web.dir}/WEB-INF">
405 <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
408 <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">
409 <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
410 <copy todir="${build.classes.dir}">
411 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
414 <target if="has.custom.manifest" name="-copy-manifest">
415 <mkdir dir="${build.meta.inf.dir}"/>
416 <copy todir="${build.meta.inf.dir}">
417 <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
420 <target if="has.persistence.xml" name="-copy-persistence-xml">
421 <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
422 <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
423 <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
426 <target name="-post-compile">
427 <!-- Empty placeholder for easier customization. -->
428 <!-- You can override this target in the ../build.xml file. -->
430 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
431 <target name="-pre-compile-single">
432 <!-- Empty placeholder for easier customization. -->
433 <!-- You can override this target in the ../build.xml file. -->
435 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
436 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
437 <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
438 <copy todir="${build.classes.dir}">
439 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
442 <target name="-post-compile-single">
443 <!-- Empty placeholder for easier customization. -->
444 <!-- You can override this target in the ../build.xml file. -->
446 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
447 <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
448 <mkdir dir="${build.generated.dir}/src"/>
449 <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
450 <arg value="-uriroot"/>
451 <arg file="${basedir}/${build.web.dir}"/>
453 <arg file="${basedir}/${build.generated.dir}/src"/>
455 <arg value="-compilerSourceVM ${javac.source}"/>
456 <arg value="-compilerTargetVM ${javac.target}"/>
457 <arg value="-javaEncoding ${source.encoding}"/>
458 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
460 <mkdir dir="${build.generated.dir}/classes"/>
461 <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
463 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
464 <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
465 <mkdir dir="${build.generated.dir}/src"/>
466 <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
467 <arg value="-uriroot"/>
468 <arg file="${basedir}/${build.web.dir}"/>
470 <arg file="${basedir}/${build.generated.dir}/src"/>
472 <arg value="-jspc.files"/>
473 <arg path="${jsp.includes}"/>
474 <arg value="-compilerSourceVM ${javac.source}"/>
475 <arg value="-compilerTargetVM ${javac.target}"/>
476 <arg value="-javaEncoding ${source.encoding}"/>
477 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
479 <mkdir dir="${build.generated.dir}/classes"/>
480 <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
482 <patternset includes="${javac.jsp.includes}"/>
486 <target name="compile-single-jsp">
487 <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
488 <antcall target="-do-compile-single-jsp"/>
491 DIST BUILDING SECTION
493 <target name="-pre-dist">
494 <!-- Empty placeholder for easier customization. -->
495 <!-- You can override this target in the ../build.xml file. -->
497 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
498 <dirname file="${dist.war}" property="dist.jar.dir"/>
499 <mkdir dir="${dist.jar.dir}"/>
500 <jar compress="${jar.compress}" jarfile="${dist.war}">
501 <fileset dir="${build.web.dir}"/>
504 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
505 <dirname file="${dist.war}" property="dist.jar.dir"/>
506 <mkdir dir="${dist.jar.dir}"/>
507 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
508 <fileset dir="${build.web.dir}"/>
511 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
512 <dirname file="${dist.war}" property="dist.jar.dir"/>
513 <mkdir dir="${dist.jar.dir}"/>
514 <jar compress="${jar.compress}" jarfile="${dist.war}">
515 <fileset dir="${build.web.dir}"/>
518 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
519 <dirname file="${dist.war}" property="dist.jar.dir"/>
520 <mkdir dir="${dist.jar.dir}"/>
521 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
522 <fileset dir="${build.web.dir}"/>
525 <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
526 <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
527 <copyfiles files="${reference.SuperDAO.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.reference.SuperDAO.jar" todir="${dist.ear.dir}"/>
528 <mkdir dir="${build.web.dir}/META-INF"/>
529 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update">
530 <attribute name="Class-Path" value="${manifest.reference.SuperDAO.jar} "/>
533 <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
534 <copyfiles files="${reference.SuperDAO.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
536 <target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
537 <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
538 <mkdir dir="${dist.jar.dir}"/>
539 <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
540 <fileset dir="${build.web.dir}"/>
543 <target name="-post-dist">
544 <!-- Empty placeholder for easier customization. -->
545 <!-- You can override this target in the ../build.xml file. -->
547 <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
548 <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"/>
552 <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
553 <target name="-pre-run-deploy">
554 <!-- Empty placeholder for easier customization. -->
555 <!-- You can override this target in the ../build.xml file. -->
557 <target name="-post-run-deploy">
558 <!-- Empty placeholder for easier customization. -->
559 <!-- You can override this target in the ../build.xml file. -->
561 <target name="-pre-nbmodule-run-deploy">
562 <!-- Empty placeholder for easier customization. -->
563 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
565 <target name="-post-nbmodule-run-deploy">
566 <!-- Empty placeholder for easier customization. -->
567 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
569 <target name="-run-deploy-am">
570 <!-- Task to deploy to the Access Manager runtime. -->
572 <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">
575 <target if="netbeans.home" name="-run-deploy-nb">
576 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
578 <target name="-init-deploy-ant" unless="netbeans.home">
579 <property name="deploy.ant.archive" value="${dist.war}"/>
580 <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
581 <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
582 <property name="deploy.ant.enabled" value="true"/>
584 <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
585 <target if="netbeans.home" name="-run-undeploy-nb">
586 <fail message="Undeploy is not supported from within the IDE"/>
588 <target depends="init,-pre-dist,dist,-post-dist" name="verify">
589 <nbverify file="${dist.war}"/>
591 <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
592 <target if="do.display.browser" name="-init-display-browser">
593 <condition property="do.display.browser.nb">
594 <isset property="netbeans.home"/>
596 <condition property="do.display.browser.cl">
597 <isset property="deploy.ant.enabled"/>
600 <target if="do.display.browser.nb" name="-display-browser-nb">
601 <nbbrowse url="${client.url}"/>
603 <target if="do.display.browser.cl" name="-get-browser" unless="browser">
604 <condition property="browser" value="rundll32">
605 <os family="windows"/>
607 <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
608 <os family="windows"/>
610 <condition property="browser" value="/usr/bin/open">
613 <property environment="env"/>
614 <condition property="browser" value="${env.BROWSER}">
615 <isset property="env.BROWSER"/>
617 <condition property="browser" value="/usr/bin/firefox">
618 <available file="/usr/bin/firefox"/>
620 <condition property="browser" value="/usr/local/firefox/firefox">
621 <available file="/usr/local/firefox/firefox"/>
623 <condition property="browser" value="/usr/bin/mozilla">
624 <available file="/usr/bin/mozilla"/>
626 <condition property="browser" value="/usr/local/mozilla/mozilla">
627 <available file="/usr/local/mozilla/mozilla"/>
629 <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
630 <available file="/usr/sfw/lib/firefox/firefox"/>
632 <condition property="browser" value="/opt/csw/bin/firefox">
633 <available file="/opt/csw/bin/firefox"/>
635 <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
636 <available file="/usr/sfw/lib/mozilla/mozilla"/>
638 <condition property="browser" value="/opt/csw/bin/mozilla">
639 <available file="/opt/csw/bin/mozilla"/>
642 <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
643 <fail unless="browser">
644 Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
646 <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
647 <echo>Launching ${browse.url}</echo>
648 <exec executable="${browser}" spawn="true">
649 <arg line="${browser.args} ${browse.url}"/>
652 <target depends="init,-init-cos,compile-single" name="run-main">
653 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
654 <webproject1:java classname="${run.class}"/>
656 <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
657 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
658 <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
663 <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">
664 <nbstartserver debugmode="true"/>
665 <antcall target="connect-debugger"/>
666 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
667 <antcall target="debug-display-browser"/>
668 <antcall target="connect-client-debugger"/>
670 <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
671 <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
673 <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
676 <path path="${web.docbase.dir}"/>
680 <target if="do.display.browser.debug" name="debug-display-browser">
681 <nbbrowse url="${client.url}"/>
683 <target if="do.debug.client" name="connect-client-debugger">
684 <webproject1:nbjsdebugstart webUrl="${client.url}"/>
686 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
687 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
688 <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
690 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
691 <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
692 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
693 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
695 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
696 <webproject1:nbjpdastart name="${debug.class}"/>
698 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
699 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
700 <webproject1:debug classname="${debug.class}"/>
702 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
703 <target depends="init" name="-pre-debug-fix">
704 <fail unless="fix.includes">Must set fix.includes</fail>
705 <property name="javac.includes" value="${fix.includes}.java"/>
707 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
708 <webproject1:nbjpdareload/>
710 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
714 <target depends="init" name="javadoc-build">
715 <mkdir dir="${dist.javadoc.dir}"/>
716 <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}">
718 <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
720 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
721 <filename name="**/*.java"/>
723 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
724 <include name="**/*.java"/>
728 <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
729 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
731 <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
734 JUNIT COMPILATION SECTION
736 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
737 <mkdir dir="${build.test.classes.dir}"/>
739 <target name="-pre-compile-test">
740 <!-- Empty placeholder for easier customization. -->
741 <!-- You can override this target in the ../build.xml file. -->
743 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
744 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
745 <copy todir="${build.test.classes.dir}">
746 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
749 <target name="-post-compile-test">
750 <!-- Empty placeholder for easier customization. -->
751 <!-- You can override this target in the ../build.xml file. -->
753 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
754 <target name="-pre-compile-test-single">
755 <!-- Empty placeholder for easier customization. -->
756 <!-- You can override this target in the ../build.xml file. -->
758 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
759 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
760 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
761 <copy todir="${build.test.classes.dir}">
762 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
765 <target name="-post-compile-test-single">
766 <!-- Empty placeholder for easier customization. -->
767 <!-- You can override this target in the ../build.xml file. -->
769 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
772 JUNIT EXECUTION SECTION
774 <target depends="init" if="have.tests" name="-pre-test-run">
775 <mkdir dir="${build.test.results.dir}"/>
777 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
778 <webproject2:junit testincludes="**/*Test.java"/>
780 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
781 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
783 <target depends="init" if="have.tests" name="test-report"/>
784 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
785 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
786 <target depends="init" if="have.tests" name="-pre-test-run-single">
787 <mkdir dir="${build.test.results.dir}"/>
789 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
790 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
791 <webproject2:junit excludes="" includes="${test.includes}"/>
793 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
794 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
796 <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"/>
799 JUNIT DEBUGGING SECTION
801 <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
802 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
803 <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
804 <delete file="${test.report.file}"/>
805 <!-- must exist, otherwise the XML formatter would fail -->
806 <mkdir dir="${build.test.results.dir}"/>
807 <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}">
809 <arg value="showoutput=true"/>
810 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
811 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
815 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
816 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
818 <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
819 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
820 <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
822 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
827 <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps">
828 <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="clean"/>
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"/>