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"/>
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}'">
177 <isset property="endorsed.classpath"/>
178 <length length="0" string="${endorsed.classpath}" when="greater"/>
181 <condition else="false" property="jdkBug6558476">
183 <matches pattern="1\.[56]" string="${java.specification.version}"/>
189 <property name="javac.fork" value="${jdkBug6558476}"/>
190 <condition property="junit.available">
192 <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
193 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
196 <condition property="testng.available">
197 <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
199 <condition property="junit+testng.available">
201 <istrue value="${junit.available}"/>
202 <istrue value="${testng.available}"/>
205 <condition else="testng" property="testng.mode" value="mixed">
206 <istrue value="${junit+testng.available}"/>
208 <condition else="" property="testng.debug.mode" value="-mixed">
209 <istrue value="${junit+testng.available}"/>
212 <target depends="init" name="-init-cos" unless="deploy.on.save">
213 <condition property="deploy.on.save" value="true">
215 <istrue value="${j2ee.deploy.on.save}"/>
216 <istrue value="${j2ee.compile.on.save}"/>
220 <target name="-post-init">
221 <!-- Empty placeholder for easier customization. -->
222 <!-- You can override this target in the ../build.xml file. -->
224 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
225 <fail unless="src.dir">Must set src.dir</fail>
226 <fail unless="test.src.dir">Must set test.src.dir</fail>
227 <fail unless="build.dir">Must set build.dir</fail>
228 <fail unless="build.web.dir">Must set build.web.dir</fail>
229 <fail unless="build.generated.dir">Must set build.generated.dir</fail>
230 <fail unless="dist.dir">Must set dist.dir</fail>
231 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
232 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
233 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
234 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
235 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
236 <fail unless="dist.war">Must set dist.war</fail>
237 <condition property="missing.j2ee.server.home">
239 <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>
241 <isset property="j2ee.server.home"/>
245 <fail if="missing.j2ee.server.home">
246 The Java EE server classpath is not correctly set up - server home directory is missing.
247 Either open the project in the IDE and assign the server or setup the server classpath manually.
248 For example like this:
249 ant -Dj2ee.server.home=<app_server_installation_directory>
251 <fail unless="j2ee.platform.classpath">
252 The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
253 Either open the project in the IDE and assign the server or setup the server classpath manually.
254 For example like this:
255 ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)
256 or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)
259 <target name="-init-macrodef-property">
260 <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
261 <attribute name="name"/>
262 <attribute name="value"/>
264 <property name="@{name}" value="${@{value}}"/>
268 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
269 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
270 <attribute default="${src.dir}" name="srcdir"/>
271 <attribute default="${build.classes.dir}" name="destdir"/>
272 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
273 <attribute default="${javac.processorpath}" name="processorpath"/>
274 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
275 <attribute default="${includes}" name="includes"/>
276 <attribute default="${excludes}" name="excludes"/>
277 <attribute default="${javac.debug}" name="debug"/>
278 <attribute default="${empty.dir}" name="gensrcdir"/>
279 <element name="customize" optional="true"/>
281 <property location="${build.dir}/empty" name="empty.dir"/>
282 <mkdir dir="${empty.dir}"/>
283 <mkdir dir="@{apgeneratedsrcdir}"/>
284 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
286 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
291 <path path="@{classpath}"/>
293 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
294 <compilerarg line="${javac.compilerargs}"/>
295 <compilerarg value="-processorpath"/>
296 <compilerarg path="@{processorpath}:${empty.dir}"/>
297 <compilerarg line="${ap.processors.internal}"/>
298 <compilerarg value="-s"/>
299 <compilerarg path="@{apgeneratedsrcdir}"/>
300 <compilerarg line="${ap.proc.none.internal}"/>
306 <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
307 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
308 <attribute default="${src.dir}" name="srcdir"/>
309 <attribute default="${build.classes.dir}" name="destdir"/>
310 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
311 <attribute default="${javac.processorpath}" name="processorpath"/>
312 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
313 <attribute default="${includes}" name="includes"/>
314 <attribute default="${excludes}" name="excludes"/>
315 <attribute default="${javac.debug}" name="debug"/>
316 <attribute default="${empty.dir}" name="gensrcdir"/>
317 <element name="customize" optional="true"/>
319 <property location="${build.dir}/empty" name="empty.dir"/>
320 <mkdir dir="${empty.dir}"/>
321 <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}">
323 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
328 <path path="@{classpath}"/>
330 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
331 <compilerarg line="${javac.compilerargs}"/>
337 <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
338 <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2">
339 <attribute default="${src.dir}" name="srcdir"/>
340 <attribute default="${build.classes.dir}" name="destdir"/>
341 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
343 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
345 <path path="@{classpath}"/>
350 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2">
351 <attribute default="${build.classes.dir}" name="destdir"/>
353 <fail unless="javac.includes">Must set javac.includes</fail>
354 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
356 <filelist dir="@{destdir}" files="${javac.includes}"/>
358 <globmapper from="*.java" to="*.class"/>
360 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
361 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
363 <files includesfile="${javac.includesfile.binary}"/>
365 <delete file="${javac.includesfile.binary}"/>
369 <target if="${junit.available}" name="-init-macrodef-junit-init">
370 <condition else="false" property="nb.junit.batch" value="true">
372 <istrue value="${junit.available}"/>
374 <isset property="test.method"/>
378 <condition else="false" property="nb.junit.single" value="true">
380 <istrue value="${junit.available}"/>
381 <isset property="test.method"/>
385 <target name="-init-test-properties">
386 <property name="test.binaryincludes" value="<nothing>"/>
387 <property name="test.binarytestincludes" value=""/>
388 <property name="test.binaryexcludes" value=""/>
390 <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
391 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
392 <attribute default="${includes}" name="includes"/>
393 <attribute default="${excludes}" name="excludes"/>
394 <attribute default="**" name="testincludes"/>
395 <attribute default="" name="testmethods"/>
396 <element name="customize" optional="true"/>
398 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
399 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
401 <propertyref prefix="test-sys-prop."/>
402 <mapper from="test-sys-prop.*" to="*" type="glob"/>
404 <formatter type="brief" usefile="false"/>
405 <formatter type="xml"/>
406 <jvmarg value="-ea"/>
412 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
413 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
414 <attribute default="${includes}" name="includes"/>
415 <attribute default="${excludes}" name="excludes"/>
416 <attribute default="**" name="testincludes"/>
417 <attribute default="" name="testmethods"/>
418 <element name="customize" optional="true"/>
420 <property name="run.jvmargs.ide" value=""/>
421 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
422 <batchtest todir="${build.test.results.dir}">
423 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
424 <filename name="@{testincludes}"/>
426 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
427 <filename name="${test.binarytestincludes}"/>
431 <propertyref prefix="test-sys-prop."/>
432 <mapper from="test-sys-prop.*" to="*" type="glob"/>
434 <formatter type="brief" usefile="false"/>
435 <formatter type="xml"/>
436 <jvmarg value="-ea"/>
437 <jvmarg line="${run.jvmargs.ide}"/>
443 <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
444 <target if="${testng.available}" name="-init-macrodef-testng">
445 <macrodef name="testng" uri="http://www.netbeans.org/ns/web-project/2">
446 <attribute default="${includes}" name="includes"/>
447 <attribute default="${excludes}" name="excludes"/>
448 <attribute default="**" name="testincludes"/>
449 <attribute default="" name="testmethods"/>
450 <element name="customize" optional="true"/>
452 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
453 <isset property="test.method"/>
455 <union id="test.set">
456 <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
457 <filename name="@{testincludes}"/>
460 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
461 <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="sql-vyuka" testname="TestNG tests" workingDir="${basedir}">
462 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
464 <propertyref prefix="test-sys-prop."/>
465 <mapper from="test-sys-prop.*" to="*" type="glob"/>
472 <target name="-init-macrodef-test-impl">
473 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
474 <attribute default="${includes}" name="includes"/>
475 <attribute default="${excludes}" name="excludes"/>
476 <attribute default="**" name="testincludes"/>
477 <attribute default="" name="testmethods"/>
478 <element implicit="true" name="customize" optional="true"/>
480 <echo>No tests executed.</echo>
484 <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
485 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
486 <attribute default="${includes}" name="includes"/>
487 <attribute default="${excludes}" name="excludes"/>
488 <attribute default="**" name="testincludes"/>
489 <attribute default="" name="testmethods"/>
490 <element implicit="true" name="customize" optional="true"/>
492 <webproject2:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
498 <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
499 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
500 <attribute default="${includes}" name="includes"/>
501 <attribute default="${excludes}" name="excludes"/>
502 <attribute default="**" name="testincludes"/>
503 <attribute default="" name="testmethods"/>
504 <element implicit="true" name="customize" optional="true"/>
506 <webproject2:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
508 </webproject2:testng>
512 <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
513 <macrodef name="test" uri="http://www.netbeans.org/ns/web-project/2">
514 <attribute default="${includes}" name="includes"/>
515 <attribute default="${excludes}" name="excludes"/>
516 <attribute default="**" name="testincludes"/>
517 <attribute default="" name="testmethods"/>
519 <webproject2:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
522 <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
524 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
525 <jvmarg line="${runmain.jvmargs}"/>
527 </webproject2:test-impl>
531 <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
532 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2">
533 <attribute default="${includes}" name="includes"/>
534 <attribute default="${excludes}" name="excludes"/>
535 <attribute default="**" name="testincludes"/>
536 <attribute default="" name="testmethods"/>
537 <element name="customize" optional="true"/>
539 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
540 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
542 <propertyref prefix="test-sys-prop."/>
543 <mapper from="test-sys-prop.*" to="*" type="glob"/>
545 <formatter type="brief" usefile="false"/>
546 <formatter type="xml"/>
547 <jvmarg value="-ea"/>
548 <jvmarg line="${debug-args-line}"/>
549 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
555 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
556 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2">
557 <attribute default="${includes}" name="includes"/>
558 <attribute default="${excludes}" name="excludes"/>
559 <attribute default="**" name="testincludes"/>
560 <attribute default="" name="testmethods"/>
561 <element name="customize" optional="true"/>
563 <property name="run.jvmargs.ide" value=""/>
564 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
565 <batchtest todir="${build.test.results.dir}">
566 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
567 <filename name="@{testincludes}"/>
569 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
570 <filename name="${test.binarytestincludes}"/>
574 <propertyref prefix="test-sys-prop."/>
575 <mapper from="test-sys-prop.*" to="*" type="glob"/>
577 <formatter type="brief" usefile="false"/>
578 <formatter type="xml"/>
579 <jvmarg value="-ea"/>
580 <jvmarg line="${run.jvmargs.ide}"/>
581 <jvmarg line="${debug-args-line}"/>
582 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
588 <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
589 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/web-project/2">
590 <attribute default="${includes}" name="includes"/>
591 <attribute default="${excludes}" name="excludes"/>
592 <attribute default="**" name="testincludes"/>
593 <attribute default="" name="testmethods"/>
594 <element implicit="true" name="customize" optional="true"/>
596 <webproject2:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
598 </webproject2:junit-debug>
602 <target if="${testng.available}" name="-init-macrodef-testng-debug">
603 <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/web-project/2">
604 <attribute default="${main.class}" name="testClass"/>
605 <attribute default="" name="testMethod"/>
606 <element name="customize2" optional="true"/>
608 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
609 <isset property="test.method"/>
611 <condition else="-suitename sql-vyuka -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
612 <matches pattern=".*\.xml" string="@{testClass}"/>
614 <delete dir="${build.test.results.dir}" quiet="true"/>
615 <mkdir dir="${build.test.results.dir}"/>
616 <webproject1:debug args="${testng.cmd.args}" classname="org.testng.TestNG" classpath="${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
619 <jvmarg value="-ea"/>
620 <arg line="${testng.debug.mode}"/>
621 <arg line="-d ${build.test.results.dir}"/>
622 <arg line="-listener org.testng.reporters.VerboseReporter"/>
628 <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
629 <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/web-project/2">
630 <attribute default="${main.class}" name="testClass"/>
631 <attribute default="" name="testMethod"/>
632 <element implicit="true" name="customize2" optional="true"/>
634 <webproject2:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
636 </webproject2:testng-debug>
640 <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
641 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2">
642 <attribute default="${includes}" name="includes"/>
643 <attribute default="${excludes}" name="excludes"/>
644 <attribute default="**" name="testincludes"/>
645 <attribute default="" name="testmethods"/>
646 <attribute default="${main.class}" name="testClass"/>
647 <attribute default="" name="testMethod"/>
649 <webproject2:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
652 <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
654 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
655 <jvmarg line="${runmain.jvmargs}"/>
657 </webproject2:test-debug-impl>
661 <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
662 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2">
663 <attribute default="${includes}" name="includes"/>
664 <attribute default="${excludes}" name="excludes"/>
665 <attribute default="**" name="testincludes"/>
666 <attribute default="" name="testmethods"/>
667 <attribute default="${main.class}" name="testClass"/>
668 <attribute default="" name="testMethod"/>
670 <webproject2:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
673 <propertyref prefix="test-sys-prop."/>
674 <mapper from="test-sys-prop.*" to="*" type="glob"/>
677 </webproject2:testng-debug-impl>
681 <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
682 <target name="-init-macrodef-java">
683 <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
684 <attribute default="${main.class}" name="classname"/>
685 <attribute default="${debug.classpath}" name="classpath"/>
686 <element name="customize" optional="true"/>
688 <java classname="@{classname}" fork="true">
689 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
690 <jvmarg line="${runmain.jvmargs}"/>
692 <path path="@{classpath}:${j2ee.platform.classpath}"/>
695 <propertyref prefix="run-sys-prop."/>
696 <mapper from="run-sys-prop.*" to="*" type="glob"/>
703 <target name="-init-macrodef-nbjsdebug">
704 <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
705 <attribute default="${client.url}" name="webUrl"/>
707 <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
711 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
712 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
713 <attribute default="${main.class}" name="name"/>
714 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
716 <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
718 <path path="@{classpath}"/>
723 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
724 <attribute default="${build.classes.dir}" name="dir"/>
727 <fileset dir="@{dir}" includes="${fix.classes}">
728 <include name="${fix.includes}*.class"/>
733 <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
739 <target name="-init-debug-args">
740 <property name="version-output" value="java version "${ant.java.version}"/>
741 <condition property="have-jdk-older-than-1.4">
743 <contains string="${version-output}" substring="java version "1.0"/>
744 <contains string="${version-output}" substring="java version "1.1"/>
745 <contains string="${version-output}" substring="java version "1.2"/>
746 <contains string="${version-output}" substring="java version "1.3"/>
749 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
750 <istrue value="${have-jdk-older-than-1.4}"/>
752 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
753 <os family="windows"/>
755 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
756 <isset property="debug.transport"/>
759 <target depends="-init-debug-args" name="-init-macrodef-debug">
760 <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
761 <attribute default="${main.class}" name="classname"/>
762 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
763 <attribute default="${application.args.param}" name="args"/>
764 <element name="customize" optional="true"/>
766 <java classname="@{classname}" fork="true">
767 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
768 <jvmarg line="${debug-args-line}"/>
769 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
770 <jvmarg line="${runmain.jvmargs}"/>
772 <path path="@{classpath}"/>
775 <propertyref prefix="run-sys-prop."/>
776 <mapper from="run-sys-prop.*" to="*" type="glob"/>
778 <arg line="@{args}"/>
784 <target name="-init-taskdefs">
785 <fail unless="libs.CopyLibs.classpath">
786 The libs.CopyLibs.classpath property is not set up.
787 This property must point to
788 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
789 of NetBeans IDE installation and is usually located at
790 <netbeans_installation>/java<version>/ant/extra folder.
791 Either open the project in the IDE and make sure CopyLibs library
792 exists or setup the property manually. For example like this:
793 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
795 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
797 <target name="-init-ap-cmdline-properties">
798 <property name="annotation.processing.enabled" value="true"/>
799 <property name="annotation.processing.processors.list" value=""/>
800 <property name="annotation.processing.run.all.processors" value="true"/>
801 <property name="javac.processorpath" value="${javac.classpath}"/>
802 <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
803 <condition property="ap.supported.internal" value="true">
805 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
809 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
810 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
811 <isfalse value="${annotation.processing.run.all.processors}"/>
813 <condition else="" property="ap.proc.none.internal" value="-proc:none">
814 <isfalse value="${annotation.processing.enabled}"/>
817 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
818 <property name="ap.cmd.line.internal" value=""/>
821 pre NB7.2 profiling section; consider it deprecated
823 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
824 <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
825 <!-- Empty placeholder for easier customization. -->
826 <!-- You can override this target in the ../build.xml file. -->
828 <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
829 <!-- Empty placeholder for easier customization. -->
830 <!-- You can override this target in the ../build.xml file. -->
832 <target depends="-profile-pre-init, init, -profile-post-init" if="profiler.info.jvmargs.agent" name="-profile-init-check">
833 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
834 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
837 end of pre NB7.2 profiling section
839 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
843 <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps">
844 <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="jar">
845 <property name="deploy.on.save" value="false"/>
848 <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
849 <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="jar">
850 <property name="deploy.on.save" value="false"/>
853 <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
854 <target depends="init,deps-jar" name="-pre-pre-compile">
855 <mkdir dir="${build.classes.dir}"/>
857 <target name="-pre-compile">
858 <!-- Empty placeholder for easier customization. -->
859 <!-- You can override this target in the ../build.xml file. -->
861 <target name="-copy-webdir">
862 <copy todir="${build.web.dir}">
863 <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
865 <copy todir="${build.web.dir}/WEB-INF">
866 <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
869 <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">
870 <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
871 <copy todir="${build.classes.dir}">
872 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
875 <target if="has.custom.manifest" name="-copy-manifest">
876 <mkdir dir="${build.meta.inf.dir}"/>
877 <copy todir="${build.meta.inf.dir}">
878 <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
881 <target if="has.persistence.xml" name="-copy-persistence-xml">
882 <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
883 <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
884 <fileset dir="${persistence.xml.dir}" includes="persistence.xml orm.xml"/>
887 <target name="-post-compile">
888 <!-- Empty placeholder for easier customization. -->
889 <!-- You can override this target in the ../build.xml file. -->
891 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
892 <target name="-pre-compile-single">
893 <!-- Empty placeholder for easier customization. -->
894 <!-- You can override this target in the ../build.xml file. -->
896 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
897 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
898 <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
899 <copy todir="${build.classes.dir}">
900 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
903 <target name="-post-compile-single">
904 <!-- Empty placeholder for easier customization. -->
905 <!-- You can override this target in the ../build.xml file. -->
907 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
908 <property name="jspc.schemas" value="/resources/schemas/"/>
909 <property name="jspc.dtds" value="/resources/dtds/"/>
910 <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
911 <mkdir dir="${build.generated.dir}/src"/>
912 <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
913 <arg value="-uriroot"/>
914 <arg file="${basedir}/${build.web.dir}"/>
916 <arg file="${basedir}/${build.generated.dir}/src"/>
918 <arg value="-schemas ${jspc.schemas}"/>
919 <arg value="-dtds ${jspc.dtds}"/>
920 <arg value="-compilerSourceVM ${javac.source}"/>
921 <arg value="-compilerTargetVM ${javac.target}"/>
922 <arg value="-javaEncoding ${source.encoding}"/>
923 <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
924 <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
926 <mkdir dir="${build.generated.dir}/classes"/>
927 <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
929 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
930 <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
931 <mkdir dir="${build.generated.dir}/src"/>
932 <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
933 <arg value="-uriroot"/>
934 <arg file="${basedir}/${build.web.dir}"/>
936 <arg file="${basedir}/${build.generated.dir}/src"/>
938 <arg value="-schemas ${jspc.schemas}"/>
939 <arg value="-dtds ${jspc.dtds}"/>
940 <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
941 <arg value="-jspc.files"/>
942 <arg path="${jsp.includes}"/>
943 <arg value="-compilerSourceVM ${javac.source}"/>
944 <arg value="-compilerTargetVM ${javac.target}"/>
945 <arg value="-javaEncoding ${source.encoding}"/>
946 <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
948 <mkdir dir="${build.generated.dir}/classes"/>
949 <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
951 <patternset includes="${javac.jsp.includes}"/>
955 <target name="compile-single-jsp">
956 <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
957 <antcall target="-do-compile-single-jsp"/>
960 DIST BUILDING SECTION
962 <target name="-pre-dist">
963 <!-- Empty placeholder for easier customization. -->
964 <!-- You can override this target in the ../build.xml file. -->
966 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
967 <dirname file="${dist.war}" property="dist.jar.dir"/>
968 <mkdir dir="${dist.jar.dir}"/>
969 <jar compress="${jar.compress}" jarfile="${dist.war}">
970 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
973 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
974 <dirname file="${dist.war}" property="dist.jar.dir"/>
975 <mkdir dir="${dist.jar.dir}"/>
976 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
977 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
980 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
981 <dirname file="${dist.war}" property="dist.jar.dir"/>
982 <mkdir dir="${dist.jar.dir}"/>
983 <jar compress="${jar.compress}" jarfile="${dist.war}">
984 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
987 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
988 <dirname file="${dist.war}" property="dist.jar.dir"/>
989 <mkdir dir="${dist.jar.dir}"/>
990 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
991 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
994 <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
995 <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
996 <copyfiles files="${reference.SuperDAO.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
997 <mkdir dir="${build.web.dir}/META-INF"/>
998 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
1000 <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
1001 <copyfiles files="${reference.SuperDAO.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
1003 <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
1004 <delete dir="${build.web.dir}/WEB-INF/lib"/>
1006 <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
1007 <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
1008 <mkdir dir="${dist.jar.dir}"/>
1009 <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
1010 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
1013 <target name="-post-dist">
1014 <!-- Empty placeholder for easier customization. -->
1015 <!-- You can override this target in the ../build.xml file. -->
1017 <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
1018 <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"/>
1022 <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
1023 <target name="-pre-run-deploy">
1024 <!-- Empty placeholder for easier customization. -->
1025 <!-- You can override this target in the ../build.xml file. -->
1027 <target name="-post-run-deploy">
1028 <!-- Empty placeholder for easier customization. -->
1029 <!-- You can override this target in the ../build.xml file. -->
1031 <target name="-pre-nbmodule-run-deploy">
1032 <!-- Empty placeholder for easier customization. -->
1033 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
1035 <target name="-post-nbmodule-run-deploy">
1036 <!-- Empty placeholder for easier customization. -->
1037 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
1039 <target name="-run-deploy-am">
1040 <!-- Task to deploy to the Access Manager runtime. -->
1042 <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,-do-update-breakpoints" name="run-deploy"/>
1043 <target if="netbeans.home" name="-run-deploy-nb">
1044 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
1046 <target name="-init-deploy-ant" unless="netbeans.home">
1047 <property name="deploy.ant.archive" value="${dist.war}"/>
1048 <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
1049 <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
1050 <property name="deploy.ant.enabled" value="true"/>
1052 <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
1053 <target if="netbeans.home" name="-run-undeploy-nb">
1054 <fail message="Undeploy is not supported from within the IDE"/>
1056 <target depends="init,-pre-dist,dist,-post-dist" name="verify">
1057 <nbverify file="${dist.war}"/>
1059 <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
1060 <target if="do.display.browser" name="-init-display-browser">
1061 <condition property="do.display.browser.nb">
1062 <isset property="netbeans.home"/>
1064 <condition property="do.display.browser.cl">
1065 <isset property="deploy.ant.enabled"/>
1068 <target if="do.display.browser.nb" name="-display-browser-nb">
1069 <nbbrowse url="${client.url}"/>
1071 <target if="do.display.browser.cl" name="-get-browser" unless="browser">
1072 <condition property="browser" value="rundll32">
1073 <os family="windows"/>
1075 <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
1076 <os family="windows"/>
1078 <condition property="browser" value="/usr/bin/open">
1081 <property environment="env"/>
1082 <condition property="browser" value="${env.BROWSER}">
1083 <isset property="env.BROWSER"/>
1085 <condition property="browser" value="/usr/bin/firefox">
1086 <available file="/usr/bin/firefox"/>
1088 <condition property="browser" value="/usr/local/firefox/firefox">
1089 <available file="/usr/local/firefox/firefox"/>
1091 <condition property="browser" value="/usr/bin/mozilla">
1092 <available file="/usr/bin/mozilla"/>
1094 <condition property="browser" value="/usr/local/mozilla/mozilla">
1095 <available file="/usr/local/mozilla/mozilla"/>
1097 <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
1098 <available file="/usr/sfw/lib/firefox/firefox"/>
1100 <condition property="browser" value="/opt/csw/bin/firefox">
1101 <available file="/opt/csw/bin/firefox"/>
1103 <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
1104 <available file="/usr/sfw/lib/mozilla/mozilla"/>
1106 <condition property="browser" value="/opt/csw/bin/mozilla">
1107 <available file="/opt/csw/bin/mozilla"/>
1110 <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
1111 <fail unless="browser">
1112 Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
1114 <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
1115 <echo>Launching ${browse.url}</echo>
1116 <exec executable="${browser}" spawn="true">
1117 <arg line="${browser.args} ${browse.url}"/>
1120 <target depends="init,-init-cos,compile-single" name="run-main">
1121 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1122 <webproject1:java classname="${run.class}"/>
1124 <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
1125 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1126 <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
1128 <target depends="init" if="netbeans.home" name="-do-update-breakpoints">
1129 <webproject1:nbjpdaappreloaded/>
1134 <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">
1135 <nbstartserver debugmode="true"/>
1136 <antcall target="connect-debugger"/>
1137 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
1138 <antcall target="debug-display-browser"/>
1139 <antcall target="connect-client-debugger"/>
1141 <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
1142 <condition property="listeningcp" value="sourcepath">
1143 <istrue value="${j2ee.compile.on.save}"/>
1145 <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" listeningcp="${listeningcp}" name="${name}" transport="${jpda.transport}">
1147 <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
1150 <path path="${web.docbase.dir}"/>
1154 <target if="do.display.browser.debug" name="debug-display-browser">
1155 <nbbrowse url="${client.url}"/>
1157 <target if="do.debug.client" name="connect-client-debugger">
1158 <webproject1:nbjsdebugstart webUrl="${client.url}"/>
1160 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
1161 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1162 <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
1164 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
1165 <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
1166 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
1167 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
1169 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
1170 <webproject1:nbjpdastart name="${debug.class}"/>
1172 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
1173 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1174 <webproject1:debug classname="${debug.class}"/>
1176 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
1177 <target depends="init" name="-pre-debug-fix">
1178 <fail unless="fix.includes">Must set fix.includes</fail>
1179 <property name="javac.includes" value="${fix.includes}.java"/>
1181 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1182 <webproject1:nbjpdareload/>
1184 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1191 pre NB7.2 profiling section; consider it deprecated
1193 <target description="Profile a J2EE project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
1194 <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
1195 <isset property="profiler.info.jvmargs.extra"/>
1197 <antcall target="${profiler.startserver.target}"/>
1198 <antcall target="run"/>
1199 <antcall target="-profile-start-loadgen"/>
1201 <target if="profiler.info.jvmargs.agent" name="start-profiled-server">
1202 <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
1203 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1204 <jvmarg value="${profiler.j2ee.agentID}"/>
1205 </nbstartprofiledserver>
1207 <target if="profiler.info.jvmargs.agent" name="start-profiled-server-extraargs">
1208 <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
1209 <jvmarg value="${profiler.info.jvmargs.extra}"/>
1210 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1211 <jvmarg value="${profiler.j2ee.agentID}"/>
1212 </nbstartprofiledserver>
1214 <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1215 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1218 <path path="${run.test.classpath}"/>
1219 <path path="${j2ee.platform.classpath}"/>
1222 <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
1223 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1224 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1225 <jvmarg line="${profiler.info.jvmargs}"/>
1226 <test name="${profile.class}"/>
1228 <path path="${run.test.classpath}"/>
1229 <path path="${j2ee.platform.classpath}"/>
1232 <propertyref prefix="test-sys-prop."/>
1233 <mapper from="test-sys-prop.*" to="*" type="glob"/>
1235 <formatter type="brief" usefile="false"/>
1236 <formatter type="xml"/>
1239 <target if="netbeans.home" name="-profile-check">
1240 <condition property="profiler.configured">
1242 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
1243 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
1247 <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" name="-do-profile">
1249 <nbstartserver profilemode="true"/>
1250 <nbdeploy clientUrlPart="${client.urlPart}" forceRedeploy="true" profilemode="true"/>
1251 <antcall target="debug-display-browser"/>
1252 <antcall target="-profile-start-loadgen"/>
1254 <target depends="-profile-check,-profile-pre72" description="Profile a J2EE project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1255 <antcall target="-do-profile"/>
1257 <target depends="-profile-test-single-pre72" name="profile-test-single"/>
1258 <target depends="-profile-check" if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs.agent">
1260 <antcall target="test-single"/>
1262 <target if="profiler.loadgen.path" name="-profile-start-loadgen">
1263 <loadgenstart path="${profiler.loadgen.path}"/>
1268 <target depends="init" if="have.sources" name="javadoc-build">
1269 <mkdir dir="${dist.javadoc.dir}"/>
1270 <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}">
1272 <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
1274 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1275 <filename name="**/*.java"/>
1277 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1278 <include name="**/*.java"/>
1281 <copy todir="${dist.javadoc.dir}">
1282 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1283 <filename name="**/doc-files/**"/>
1285 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1286 <include name="**/doc-files/**"/>
1290 <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
1291 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1293 <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
1296 TEST COMPILATION SECTION
1298 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1299 <mkdir dir="${build.test.classes.dir}"/>
1300 <property name="j2ee.platform.embeddableejb.classpath" value=""/>
1302 <target name="-pre-compile-test">
1303 <!-- Empty placeholder for easier customization. -->
1304 <!-- You can override this target in the ../build.xml file. -->
1306 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
1307 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1308 <copy todir="${build.test.classes.dir}">
1309 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1312 <target name="-post-compile-test">
1313 <!-- Empty placeholder for easier customization. -->
1314 <!-- You can override this target in the ../build.xml file. -->
1316 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1317 <target name="-pre-compile-test-single">
1318 <!-- Empty placeholder for easier customization. -->
1319 <!-- You can override this target in the ../build.xml file. -->
1321 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1322 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1323 <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}"/>
1324 <copy todir="${build.test.classes.dir}">
1325 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1328 <target name="-post-compile-test-single">
1329 <!-- Empty placeholder for easier customization. -->
1330 <!-- You can override this target in the ../build.xml file. -->
1332 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
1335 TEST EXECUTION SECTION
1337 <target depends="init" if="have.tests" name="-pre-test-run">
1338 <mkdir dir="${build.test.results.dir}"/>
1340 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
1341 <webproject2:test testincludes="**/*Test.java"/>
1343 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1344 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1346 <target depends="init" if="have.tests" name="test-report"/>
1347 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1348 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1349 <target depends="init" if="have.tests" name="-pre-test-run-single">
1350 <mkdir dir="${build.test.results.dir}"/>
1352 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1353 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1354 <webproject2:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1356 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1357 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1359 <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"/>
1360 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1361 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1362 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1363 <webproject2:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
1365 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
1366 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1368 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
1371 TEST DEBUGGING SECTION
1373 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
1374 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1375 <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
1377 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
1378 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1379 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1380 <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
1382 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1383 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1385 <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1386 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1387 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1388 <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1390 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1395 <target depends="init" name="deps-clean" unless="no.deps">
1396 <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="clean"/>
1398 <target depends="init" name="do-clean">
1399 <condition property="build.dir.to.clean" value="${build.web.dir}">
1400 <isset property="dist.ear.dir"/>
1402 <property name="build.dir.to.clean" value="${build.web.dir}"/>
1403 <delete includeEmptyDirs="true" quiet="true">
1404 <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
1406 <delete dir="${build.dir}"/>
1407 <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
1408 <delete dir="${dist.dir}"/>
1410 <target depends="do-clean" if="status.clean-failed" name="check-clean">
1411 <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
1412 <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
1414 <target depends="init" if="netbeans.home" name="undeploy-clean">
1415 <nbundeploy failOnError="false" startServer="false"/>
1417 <target name="-post-clean">
1418 <!-- Empty placeholder for easier customization. -->
1419 <!-- You can override this target in the ../build.xml file. -->
1421 <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
1422 <target depends="clean" description="Clean build products." name="clean-ear"/>