source: SRUAggregator/trunk/nbproject/build-impl.xml @ 2075

Last change on this file since 2075 was 2075, checked in by zastrow, 12 years ago
File size: 75.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3        *** GENERATED FROM project.xml - DO NOT EDIT  ***
4        ***         EDIT ../build.xml INSTEAD         ***
5
6        For the purpose of easier reading the script
7        is divided into following sections:
8        - initialization
9        - compilation
10        - dist
11        - execution
12        - debugging
13        - javadoc
14        - test compilation
15        - test execution
16        - test debugging
17        - cleanup
18
19        -->
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="Aggregator-impl">
21    <import file="ant-deploy.xml"/>
22    <fail message="Please build using Ant 1.7.1 or higher.">
23        <condition>
24            <not>
25                <antversion atleast="1.7.1"/>
26            </not>
27        </condition>
28    </fail>
29    <target depends="dist,javadoc" description="Build whole project." name="default"/>
30    <!--
31                INITIALIZATION SECTION
32            -->
33    <target name="-pre-init">
34        <!-- Empty placeholder for easier customization. -->
35        <!-- You can override this target in the ../build.xml file. -->
36    </target>
37    <target depends="-pre-init" name="-init-private">
38        <property file="nbproject/private/private.properties"/>
39    </target>
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"/>
46    </target>
47    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
48        <property file="nbproject/project.properties"/>
49    </target>
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">
53            <or>
54                <available file="${test.src.dir}"/>
55            </or>
56        </condition>
57        <condition property="have.sources">
58            <or>
59                <available file="${src.dir}"/>
60            </or>
61        </condition>
62        <condition property="netbeans.home+have.tests">
63            <and>
64                <isset property="netbeans.home"/>
65                <isset property="have.tests"/>
66            </and>
67        </condition>
68        <condition property="no.javadoc.preview">
69            <isfalse value="${javadoc.preview}"/>
70        </condition>
71        <property name="javac.compilerargs" value=""/>
72        <condition property="no.deps">
73            <and>
74                <istrue value="${no.dependencies}"/>
75            </and>
76        </condition>
77        <condition property="no.dist.ear.dir">
78            <not>
79                <isset property="dist.ear.dir"/>
80            </not>
81        </condition>
82        <property name="build.web.excludes" value="${build.classes.excludes}"/>
83        <condition property="do.compile.jsps">
84            <istrue value="${compile.jsps}"/>
85        </condition>
86        <condition property="do.debug.server">
87            <or>
88                <not>
89                    <isset property="debug.server"/>
90                </not>
91                <istrue value="${debug.server}"/>
92                <and>
93                    <not>
94                        <istrue value="${debug.server}"/>
95                    </not>
96                    <not>
97                        <istrue value="${debug.client}"/>
98                    </not>
99                </and>
100            </or>
101        </condition>
102        <condition property="do.debug.client">
103            <istrue value="${debug.client}"/>
104        </condition>
105        <condition property="do.display.browser">
106            <istrue value="${display.browser}"/>
107        </condition>
108        <condition property="do.display.browser.debug">
109            <and>
110                <isset property="do.display.browser"/>
111                <not>
112                    <isset property="do.debug.client"/>
113                </not>
114            </and>
115        </condition>
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"/>
120        </condition>
121        <condition property="do.war.package.without.custom.manifest">
122            <not>
123                <isset property="has.custom.manifest"/>
124            </not>
125        </condition>
126        <condition property="do.tmp.war.package.with.custom.manifest">
127            <and>
128                <isset property="has.custom.manifest"/>
129                <or>
130                    <isfalse value="${directory.deployment.supported}"/>
131                    <isset property="dist.ear.dir"/>
132                </or>
133            </and>
134        </condition>
135        <condition property="do.tmp.war.package.without.custom.manifest">
136            <and>
137                <not>
138                    <isset property="has.custom.manifest"/>
139                </not>
140                <or>
141                    <isfalse value="${directory.deployment.supported}"/>
142                    <isset property="dist.ear.dir"/>
143                </or>
144            </and>
145        </condition>
146        <condition property="do.tmp.war.package">
147            <or>
148                <isfalse value="${directory.deployment.supported}"/>
149                <isset property="dist.ear.dir"/>
150            </or>
151        </condition>
152        <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
153        <condition else="" property="application.args.param" value="${application.args}">
154            <and>
155                <isset property="application.args"/>
156                <not>
157                    <equals arg1="${application.args}" arg2="" trim="true"/>
158                </not>
159            </and>
160        </condition>
161        <property name="source.encoding" value="${file.encoding}"/>
162        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
163            <and>
164                <isset property="javadoc.encoding"/>
165                <not>
166                    <equals arg1="${javadoc.encoding}" arg2=""/>
167                </not>
168            </and>
169        </condition>
170        <property name="javadoc.encoding.used" value="${source.encoding}"/>
171        <property name="includes" value="**"/>
172        <property name="excludes" value=""/>
173        <property name="runmain.jvmargs" value=""/>
174        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
175        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
176            <and>
177                <isset property="endorsed.classpath"/>
178                <length length="0" string="${endorsed.classpath}" when="greater"/>
179            </and>
180        </condition>
181        <condition else="false" property="jdkBug6558476">
182            <and>
183                <matches pattern="1\.[56]" string="${java.specification.version}"/>
184                <not>
185                    <os family="unix"/>
186                </not>
187            </and>
188        </condition>
189        <property name="javac.fork" value="${jdkBug6558476}"/>
190        <condition property="junit.available">
191            <or>
192                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
193                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
194            </or>
195        </condition>
196        <condition property="testng.available">
197            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
198        </condition>
199        <condition property="junit+testng.available">
200            <and>
201                <istrue value="${junit.available}"/>
202                <istrue value="${testng.available}"/>
203            </and>
204        </condition>
205        <condition else="testng" property="testng.mode" value="mixed">
206            <istrue value="${junit+testng.available}"/>
207        </condition>
208        <condition else="" property="testng.debug.mode" value="-mixed">
209            <istrue value="${junit+testng.available}"/>
210        </condition>
211    </target>
212    <target depends="init" name="-init-cos" unless="deploy.on.save">
213        <condition property="deploy.on.save" value="true">
214            <or>
215                <istrue value="${j2ee.deploy.on.save}"/>
216                <istrue value="${j2ee.compile.on.save}"/>
217            </or>
218        </condition>
219    </target>
220    <target name="-post-init">
221        <!-- Empty placeholder for easier customization. -->
222        <!-- You can override this target in the ../build.xml file. -->
223    </target>
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">
238            <and>
239                <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>
240                <not>
241                    <isset property="j2ee.server.home"/>
242                </not>
243            </and>
244        </condition>
245        <fail if="missing.j2ee.server.home">
246The Java EE server classpath is not correctly set up - server home directory is missing.
247Either open the project in the IDE and assign the server or setup the server classpath manually.
248For example like this:
249   ant -Dj2ee.server.home=&lt;app_server_installation_directory&gt;
250                </fail>
251        <fail unless="j2ee.platform.classpath">
252The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
253Either open the project in the IDE and assign the server or setup the server classpath manually.
254For example like this:
255   ant -Duser.properties.file=&lt;path_to_property_file&gt; (where you put the property "j2ee.platform.classpath" in a .properties file)
256or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties file is used)
257                </fail>
258    </target>
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"/>
263            <sequential>
264                <property name="@{name}" value="${@{value}}"/>
265            </sequential>
266        </macrodef>
267    </target>
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"/>
280            <sequential>
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}">
285                    <src>
286                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
287                            <include name="*"/>
288                        </dirset>
289                    </src>
290                    <classpath>
291                        <path path="@{classpath}"/>
292                    </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}"/>
301                    <customize/>
302                </javac>
303            </sequential>
304        </macrodef>
305    </target>
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"/>
318            <sequential>
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}">
322                    <src>
323                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
324                            <include name="*"/>
325                        </dirset>
326                    </src>
327                    <classpath>
328                        <path path="@{classpath}"/>
329                    </classpath>
330                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
331                    <compilerarg line="${javac.compilerargs}"/>
332                    <customize/>
333                </javac>
334            </sequential>
335        </macrodef>
336    </target>
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"/>
342            <sequential>
343                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
344                    <classpath>
345                        <path path="@{classpath}"/>
346                    </classpath>
347                </depend>
348            </sequential>
349        </macrodef>
350        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2">
351            <attribute default="${build.classes.dir}" name="destdir"/>
352            <sequential>
353                <fail unless="javac.includes">Must set javac.includes</fail>
354                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
355                    <path>
356                        <filelist dir="@{destdir}" files="${javac.includes}"/>
357                    </path>
358                    <globmapper from="*.java" to="*.class"/>
359                </pathconvert>
360                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
361                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
362                <delete>
363                    <files includesfile="${javac.includesfile.binary}"/>
364                </delete>
365                <delete file="${javac.includesfile.binary}"/>
366            </sequential>
367        </macrodef>
368    </target>
369    <target if="${junit.available}" name="-init-macrodef-junit-init">
370        <condition else="false" property="nb.junit.batch" value="true">
371            <and>
372                <istrue value="${junit.available}"/>
373                <not>
374                    <isset property="test.method"/>
375                </not>
376            </and>
377        </condition>
378        <condition else="false" property="nb.junit.single" value="true">
379            <and>
380                <istrue value="${junit.available}"/>
381                <isset property="test.method"/>
382            </and>
383        </condition>
384    </target>
385    <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
386        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
387            <attribute default="${includes}" name="includes"/>
388            <attribute default="${excludes}" name="excludes"/>
389            <attribute default="**" name="testincludes"/>
390            <attribute default="" name="testmethods"/>
391            <element name="customize" optional="true"/>
392            <sequential>
393                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
394                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
395                    <syspropertyset>
396                        <propertyref prefix="test-sys-prop."/>
397                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
398                    </syspropertyset>
399                    <formatter type="brief" usefile="false"/>
400                    <formatter type="xml"/>
401                    <jvmarg value="-ea"/>
402                    <customize/>
403                </junit>
404            </sequential>
405        </macrodef>
406    </target>
407    <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
408        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
409            <attribute default="${includes}" name="includes"/>
410            <attribute default="${excludes}" name="excludes"/>
411            <attribute default="**" name="testincludes"/>
412            <attribute default="" name="testmethods"/>
413            <element name="customize" optional="true"/>
414            <sequential>
415                <property name="run.jvmargs.ide" value=""/>
416                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
417                    <batchtest todir="${build.test.results.dir}">
418                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
419                            <filename name="@{testincludes}"/>
420                        </fileset>
421                    </batchtest>
422                    <syspropertyset>
423                        <propertyref prefix="test-sys-prop."/>
424                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
425                    </syspropertyset>
426                    <formatter type="brief" usefile="false"/>
427                    <formatter type="xml"/>
428                    <jvmarg value="-ea"/>
429                    <jvmarg line="${run.jvmargs.ide}"/>
430                    <customize/>
431                </junit>
432            </sequential>
433        </macrodef>
434    </target>
435    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
436    <target if="${testng.available}" name="-init-macrodef-testng">
437        <macrodef name="testng" uri="http://www.netbeans.org/ns/web-project/2">
438            <attribute default="${includes}" name="includes"/>
439            <attribute default="${excludes}" name="excludes"/>
440            <attribute default="**" name="testincludes"/>
441            <attribute default="" name="testmethods"/>
442            <element name="customize" optional="true"/>
443            <sequential>
444                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
445                    <isset property="test.method"/>
446                </condition>
447                <union id="test.set">
448                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
449                        <filename name="@{testincludes}"/>
450                    </fileset>
451                </union>
452                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
453                <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Aggregator" testname="TestNG tests" workingDir="${basedir}">
454                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
455                    <propertyset>
456                        <propertyref prefix="test-sys-prop."/>
457                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
458                    </propertyset>
459                    <customize/>
460                </testng>
461            </sequential>
462        </macrodef>
463    </target>
464    <target name="-init-macrodef-test-impl">
465        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
466            <attribute default="${includes}" name="includes"/>
467            <attribute default="${excludes}" name="excludes"/>
468            <attribute default="**" name="testincludes"/>
469            <attribute default="" name="testmethods"/>
470            <element implicit="true" name="customize" optional="true"/>
471            <sequential>
472                <echo>No tests executed.</echo>
473            </sequential>
474        </macrodef>
475    </target>
476    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
477        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
478            <attribute default="${includes}" name="includes"/>
479            <attribute default="${excludes}" name="excludes"/>
480            <attribute default="**" name="testincludes"/>
481            <attribute default="" name="testmethods"/>
482            <element implicit="true" name="customize" optional="true"/>
483            <sequential>
484                <webproject2:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
485                    <customize/>
486                </webproject2:junit>
487            </sequential>
488        </macrodef>
489    </target>
490    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
491        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
492            <attribute default="${includes}" name="includes"/>
493            <attribute default="${excludes}" name="excludes"/>
494            <attribute default="**" name="testincludes"/>
495            <attribute default="" name="testmethods"/>
496            <element implicit="true" name="customize" optional="true"/>
497            <sequential>
498                <webproject2:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
499                    <customize/>
500                </webproject2:testng>
501            </sequential>
502        </macrodef>
503    </target>
504    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
505        <macrodef name="test" uri="http://www.netbeans.org/ns/web-project/2">
506            <attribute default="${includes}" name="includes"/>
507            <attribute default="${excludes}" name="excludes"/>
508            <attribute default="**" name="testincludes"/>
509            <attribute default="" name="testmethods"/>
510            <sequential>
511                <webproject2:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
512                    <customize>
513                        <classpath>
514                            <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
515                        </classpath>
516                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
517                        <jvmarg line="${runmain.jvmargs}"/>
518                    </customize>
519                </webproject2:test-impl>
520            </sequential>
521        </macrodef>
522    </target>
523    <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
524        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2">
525            <attribute default="${includes}" name="includes"/>
526            <attribute default="${excludes}" name="excludes"/>
527            <attribute default="**" name="testincludes"/>
528            <attribute default="" name="testmethods"/>
529            <element name="customize" optional="true"/>
530            <sequential>
531                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
532                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
533                    <syspropertyset>
534                        <propertyref prefix="test-sys-prop."/>
535                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
536                    </syspropertyset>
537                    <formatter type="brief" usefile="false"/>
538                    <formatter type="xml"/>
539                    <jvmarg value="-ea"/>
540                    <jvmarg line="${debug-args-line}"/>
541                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
542                    <customize/>
543                </junit>
544            </sequential>
545        </macrodef>
546    </target>
547    <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
548        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2">
549            <attribute default="${includes}" name="includes"/>
550            <attribute default="${excludes}" name="excludes"/>
551            <attribute default="**" name="testincludes"/>
552            <attribute default="" name="testmethods"/>
553            <element name="customize" optional="true"/>
554            <sequential>
555                <property name="run.jvmargs.ide" value=""/>
556                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
557                    <batchtest todir="${build.test.results.dir}">
558                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
559                            <filename name="@{testincludes}"/>
560                        </fileset>
561                    </batchtest>
562                    <syspropertyset>
563                        <propertyref prefix="test-sys-prop."/>
564                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
565                    </syspropertyset>
566                    <formatter type="brief" usefile="false"/>
567                    <formatter type="xml"/>
568                    <jvmarg value="-ea"/>
569                    <jvmarg line="${run.jvmargs.ide}"/>
570                    <jvmarg line="${debug-args-line}"/>
571                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
572                    <customize/>
573                </junit>
574            </sequential>
575        </macrodef>
576    </target>
577    <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
578        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/web-project/2">
579            <attribute default="${includes}" name="includes"/>
580            <attribute default="${excludes}" name="excludes"/>
581            <attribute default="**" name="testincludes"/>
582            <attribute default="" name="testmethods"/>
583            <element implicit="true" name="customize" optional="true"/>
584            <sequential>
585                <webproject2:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
586                    <customize/>
587                </webproject2:junit-debug>
588            </sequential>
589        </macrodef>
590    </target>
591    <target if="${testng.available}" name="-init-macrodef-testng-debug">
592        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/web-project/2">
593            <attribute default="${main.class}" name="testClass"/>
594            <attribute default="" name="testMethod"/>
595            <element name="customize2" optional="true"/>
596            <sequential>
597                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
598                    <isset property="test.method"/>
599                </condition>
600                <condition else="-suitename Aggregator -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
601                    <matches pattern=".*\.xml" string="@{testClass}"/>
602                </condition>
603                <delete dir="${build.test.results.dir}" quiet="true"/>
604                <mkdir dir="${build.test.results.dir}"/>
605                <webproject1:debug args="${testng.cmd.args}" classname="org.testng.TestNG" classpath="${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
606                    <customize>
607                        <customize2/>
608                        <jvmarg value="-ea"/>
609                        <arg line="${testng.debug.mode}"/>
610                        <arg line="-d ${build.test.results.dir}"/>
611                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
612                    </customize>
613                </webproject1:debug>
614            </sequential>
615        </macrodef>
616    </target>
617    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
618        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/web-project/2">
619            <attribute default="${main.class}" name="testClass"/>
620            <attribute default="" name="testMethod"/>
621            <element implicit="true" name="customize2" optional="true"/>
622            <sequential>
623                <webproject2:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
624                    <customize2/>
625                </webproject2:testng-debug>
626            </sequential>
627        </macrodef>
628    </target>
629    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
630        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2">
631            <attribute default="${includes}" name="includes"/>
632            <attribute default="${excludes}" name="excludes"/>
633            <attribute default="**" name="testincludes"/>
634            <attribute default="" name="testmethods"/>
635            <attribute default="${main.class}" name="testClass"/>
636            <attribute default="" name="testMethod"/>
637            <sequential>
638                <webproject2:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
639                    <customize>
640                        <classpath>
641                            <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
642                        </classpath>
643                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
644                        <jvmarg line="${runmain.jvmargs}"/>
645                    </customize>
646                </webproject2:test-debug-impl>
647            </sequential>
648        </macrodef>
649    </target>
650    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
651        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2">
652            <attribute default="${includes}" name="includes"/>
653            <attribute default="${excludes}" name="excludes"/>
654            <attribute default="**" name="testincludes"/>
655            <attribute default="" name="testmethods"/>
656            <attribute default="${main.class}" name="testClass"/>
657            <attribute default="" name="testMethod"/>
658            <sequential>
659                <webproject2:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
660                    <customize2>
661                        <syspropertyset>
662                            <propertyref prefix="test-sys-prop."/>
663                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
664                        </syspropertyset>
665                    </customize2>
666                </webproject2:testng-debug-impl>
667            </sequential>
668        </macrodef>
669    </target>
670    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
671    <target name="-init-macrodef-java">
672        <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
673            <attribute default="${main.class}" name="classname"/>
674            <attribute default="${debug.classpath}" name="classpath"/>
675            <element name="customize" optional="true"/>
676            <sequential>
677                <java classname="@{classname}" fork="true">
678                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
679                    <jvmarg line="${runmain.jvmargs}"/>
680                    <classpath>
681                        <path path="@{classpath}:${j2ee.platform.classpath}"/>
682                    </classpath>
683                    <syspropertyset>
684                        <propertyref prefix="run-sys-prop."/>
685                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
686                    </syspropertyset>
687                    <customize/>
688                </java>
689            </sequential>
690        </macrodef>
691    </target>
692    <target name="-init-macrodef-nbjsdebug">
693        <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
694            <attribute default="${client.url}" name="webUrl"/>
695            <sequential>
696                <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
697            </sequential>
698        </macrodef>
699    </target>
700    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
701        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
702            <attribute default="${main.class}" name="name"/>
703            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
704            <sequential>
705                <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
706                    <classpath>
707                        <path path="@{classpath}"/>
708                    </classpath>
709                </nbjpdastart>
710            </sequential>
711        </macrodef>
712        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
713            <attribute default="${build.classes.dir}" name="dir"/>
714            <sequential>
715                <nbjpdareload>
716                    <fileset dir="@{dir}" includes="${fix.classes}">
717                        <include name="${fix.includes}*.class"/>
718                    </fileset>
719                </nbjpdareload>
720            </sequential>
721        </macrodef>
722        <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
723            <sequential>
724                <nbjpdaappreloaded/>
725            </sequential>
726        </macrodef>
727    </target>
728    <target name="-init-debug-args">
729        <property name="version-output" value="java version &quot;${ant.java.version}"/>
730        <condition property="have-jdk-older-than-1.4">
731            <or>
732                <contains string="${version-output}" substring="java version &quot;1.0"/>
733                <contains string="${version-output}" substring="java version &quot;1.1"/>
734                <contains string="${version-output}" substring="java version &quot;1.2"/>
735                <contains string="${version-output}" substring="java version &quot;1.3"/>
736            </or>
737        </condition>
738        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
739            <istrue value="${have-jdk-older-than-1.4}"/>
740        </condition>
741        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
742            <os family="windows"/>
743        </condition>
744        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
745            <isset property="debug.transport"/>
746        </condition>
747    </target>
748    <target depends="-init-debug-args" name="-init-macrodef-debug">
749        <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
750            <attribute default="${main.class}" name="classname"/>
751            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
752            <attribute default="${application.args.param}" name="args"/>
753            <element name="customize" optional="true"/>
754            <sequential>
755                <java classname="@{classname}" fork="true">
756                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
757                    <jvmarg line="${debug-args-line}"/>
758                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
759                    <jvmarg line="${runmain.jvmargs}"/>
760                    <classpath>
761                        <path path="@{classpath}"/>
762                    </classpath>
763                    <syspropertyset>
764                        <propertyref prefix="run-sys-prop."/>
765                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
766                    </syspropertyset>
767                    <arg line="@{args}"/>
768                    <customize/>
769                </java>
770            </sequential>
771        </macrodef>
772    </target>
773    <target name="-init-taskdefs">
774        <fail unless="libs.CopyLibs.classpath">
775The libs.CopyLibs.classpath property is not set up.
776This property must point to
777org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
778of NetBeans IDE installation and is usually located at
779&lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
780Either open the project in the IDE and make sure CopyLibs library
781exists or setup the property manually. For example like this:
782 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
783                </fail>
784        <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
785    </target>
786    <target name="-init-ap-cmdline-properties">
787        <property name="annotation.processing.enabled" value="true"/>
788        <property name="annotation.processing.processors.list" value=""/>
789        <property name="annotation.processing.run.all.processors" value="true"/>
790        <property name="javac.processorpath" value="${javac.classpath}"/>
791        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
792        <condition property="ap.supported.internal" value="true">
793            <not>
794                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
795            </not>
796        </condition>
797    </target>
798    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
799        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
800            <isfalse value="${annotation.processing.run.all.processors}"/>
801        </condition>
802        <condition else="" property="ap.proc.none.internal" value="-proc:none">
803            <isfalse value="${annotation.processing.enabled}"/>
804        </condition>
805    </target>
806    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
807        <property name="ap.cmd.line.internal" value=""/>
808    </target>
809    <!--
810                pre NB7.2 profiling section; consider it deprecated
811            -->
812    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
813    <target name="-profile-pre-init">
814        <!-- Empty placeholder for easier customization. -->
815        <!-- You can override this target in the ../build.xml file. -->
816    </target>
817    <target name="-profile-post-init">
818        <!-- Empty placeholder for easier customization. -->
819        <!-- You can override this target in the ../build.xml file. -->
820    </target>
821    <target depends="-profile-pre-init, init, -profile-post-init" if="profiler.info.jvmargs.agent" name="-profile-init-check">
822        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
823        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
824    </target>
825    <!--
826                end of pre NB7.2 profiling section
827            -->
828    <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"/>
829    <!--
830                COMPILATION SECTION
831            -->
832    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
833    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
834    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
835    <target depends="init,deps-jar" name="-pre-pre-compile">
836        <mkdir dir="${build.classes.dir}"/>
837    </target>
838    <target name="-pre-compile">
839        <!-- Empty placeholder for easier customization. -->
840        <!-- You can override this target in the ../build.xml file. -->
841    </target>
842    <target name="-copy-webdir">
843        <copy todir="${build.web.dir}">
844            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
845        </copy>
846        <copy todir="${build.web.dir}/WEB-INF">
847            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
848        </copy>
849    </target>
850    <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">
851        <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
852        <copy todir="${build.classes.dir}">
853            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
854        </copy>
855    </target>
856    <target if="has.custom.manifest" name="-copy-manifest">
857        <mkdir dir="${build.meta.inf.dir}"/>
858        <copy todir="${build.meta.inf.dir}">
859            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
860        </copy>
861    </target>
862    <target if="has.persistence.xml" name="-copy-persistence-xml">
863        <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
864        <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
865            <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
866        </copy>
867    </target>
868    <target name="-post-compile">
869        <!-- Empty placeholder for easier customization. -->
870        <!-- You can override this target in the ../build.xml file. -->
871    </target>
872    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
873    <target name="-pre-compile-single">
874        <!-- Empty placeholder for easier customization. -->
875        <!-- You can override this target in the ../build.xml file. -->
876    </target>
877    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
878        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
879        <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
880        <copy todir="${build.classes.dir}">
881            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
882        </copy>
883    </target>
884    <target name="-post-compile-single">
885        <!-- Empty placeholder for easier customization. -->
886        <!-- You can override this target in the ../build.xml file. -->
887    </target>
888    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
889    <property name="jspc.schemas" value="/resources/schemas/"/>
890    <property name="jspc.dtds" value="/resources/dtds/"/>
891    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
892        <mkdir dir="${build.generated.dir}/src"/>
893        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
894            <arg value="-uriroot"/>
895            <arg file="${basedir}/${build.web.dir}"/>
896            <arg value="-d"/>
897            <arg file="${basedir}/${build.generated.dir}/src"/>
898            <arg value="-die1"/>
899            <arg value="-schemas ${jspc.schemas}"/>
900            <arg value="-dtds ${jspc.dtds}"/>
901            <arg value="-compilerSourceVM ${javac.source}"/>
902            <arg value="-compilerTargetVM ${javac.target}"/>
903            <arg value="-javaEncoding ${source.encoding}"/>
904            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
905            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
906        </java>
907        <mkdir dir="${build.generated.dir}/classes"/>
908        <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"/>
909    </target>
910    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
911        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
912        <mkdir dir="${build.generated.dir}/src"/>
913        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
914            <arg value="-uriroot"/>
915            <arg file="${basedir}/${build.web.dir}"/>
916            <arg value="-d"/>
917            <arg file="${basedir}/${build.generated.dir}/src"/>
918            <arg value="-die1"/>
919            <arg value="-schemas ${jspc.schemas}"/>
920            <arg value="-dtds ${jspc.dtds}"/>
921            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
922            <arg value="-jspc.files"/>
923            <arg path="${jsp.includes}"/>
924            <arg value="-compilerSourceVM ${javac.source}"/>
925            <arg value="-compilerTargetVM ${javac.target}"/>
926            <arg value="-javaEncoding ${source.encoding}"/>
927            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
928        </java>
929        <mkdir dir="${build.generated.dir}/classes"/>
930        <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">
931            <customize>
932                <patternset includes="${javac.jsp.includes}"/>
933            </customize>
934        </webproject2:javac>
935    </target>
936    <target name="compile-single-jsp">
937        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
938        <antcall target="-do-compile-single-jsp"/>
939    </target>
940    <!--
941                DIST BUILDING SECTION
942            -->
943    <target name="-pre-dist">
944        <!-- Empty placeholder for easier customization. -->
945        <!-- You can override this target in the ../build.xml file. -->
946    </target>
947    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
948        <dirname file="${dist.war}" property="dist.jar.dir"/>
949        <mkdir dir="${dist.jar.dir}"/>
950        <jar compress="${jar.compress}" jarfile="${dist.war}">
951            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
952        </jar>
953    </target>
954    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
955        <dirname file="${dist.war}" property="dist.jar.dir"/>
956        <mkdir dir="${dist.jar.dir}"/>
957        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
958            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
959        </jar>
960    </target>
961    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
962        <dirname file="${dist.war}" property="dist.jar.dir"/>
963        <mkdir dir="${dist.jar.dir}"/>
964        <jar compress="${jar.compress}" jarfile="${dist.war}">
965            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
966        </jar>
967    </target>
968    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
969        <dirname file="${dist.war}" property="dist.jar.dir"/>
970        <mkdir dir="${dist.jar.dir}"/>
971        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
972            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
973        </jar>
974    </target>
975    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
976    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
977        <copyfiles files="${libs.zk.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
978        <mkdir dir="${build.web.dir}/META-INF"/>
979        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
980    </target>
981    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
982        <copyfiles files="${libs.zk.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
983    </target>
984    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
985        <delete dir="${build.web.dir}/WEB-INF/lib"/>
986    </target>
987    <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
988        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
989        <mkdir dir="${dist.jar.dir}"/>
990        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
991            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
992        </jar>
993    </target>
994    <target name="-post-dist">
995        <!-- Empty placeholder for easier customization. -->
996        <!-- You can override this target in the ../build.xml file. -->
997    </target>
998    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
999    <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"/>
1000    <!--
1001                EXECUTION SECTION
1002            -->
1003    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
1004    <target name="-pre-run-deploy">
1005        <!-- Empty placeholder for easier customization. -->
1006        <!-- You can override this target in the ../build.xml file. -->
1007    </target>
1008    <target name="-post-run-deploy">
1009        <!-- Empty placeholder for easier customization. -->
1010        <!-- You can override this target in the ../build.xml file. -->
1011    </target>
1012    <target name="-pre-nbmodule-run-deploy">
1013        <!-- Empty placeholder for easier customization. -->
1014        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
1015    </target>
1016    <target name="-post-nbmodule-run-deploy">
1017        <!-- Empty placeholder for easier customization. -->
1018        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
1019    </target>
1020    <target name="-run-deploy-am">
1021        <!-- Task to deploy to the Access Manager runtime. -->
1022    </target>
1023    <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"/>
1024    <target if="netbeans.home" name="-run-deploy-nb">
1025        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
1026    </target>
1027    <target name="-init-deploy-ant" unless="netbeans.home">
1028        <property name="deploy.ant.archive" value="${dist.war}"/>
1029        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
1030        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
1031        <property name="deploy.ant.enabled" value="true"/>
1032    </target>
1033    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
1034    <target if="netbeans.home" name="-run-undeploy-nb">
1035        <fail message="Undeploy is not supported from within the IDE"/>
1036    </target>
1037    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
1038        <nbverify file="${dist.war}"/>
1039    </target>
1040    <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
1041    <target if="do.display.browser" name="-init-display-browser">
1042        <condition property="do.display.browser.nb">
1043            <isset property="netbeans.home"/>
1044        </condition>
1045        <condition property="do.display.browser.cl">
1046            <isset property="deploy.ant.enabled"/>
1047        </condition>
1048    </target>
1049    <target if="do.display.browser.nb" name="-display-browser-nb">
1050        <nbbrowse url="${client.url}"/>
1051    </target>
1052    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
1053        <condition property="browser" value="rundll32">
1054            <os family="windows"/>
1055        </condition>
1056        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
1057            <os family="windows"/>
1058        </condition>
1059        <condition property="browser" value="/usr/bin/open">
1060            <os family="mac"/>
1061        </condition>
1062        <property environment="env"/>
1063        <condition property="browser" value="${env.BROWSER}">
1064            <isset property="env.BROWSER"/>
1065        </condition>
1066        <condition property="browser" value="/usr/bin/firefox">
1067            <available file="/usr/bin/firefox"/>
1068        </condition>
1069        <condition property="browser" value="/usr/local/firefox/firefox">
1070            <available file="/usr/local/firefox/firefox"/>
1071        </condition>
1072        <condition property="browser" value="/usr/bin/mozilla">
1073            <available file="/usr/bin/mozilla"/>
1074        </condition>
1075        <condition property="browser" value="/usr/local/mozilla/mozilla">
1076            <available file="/usr/local/mozilla/mozilla"/>
1077        </condition>
1078        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
1079            <available file="/usr/sfw/lib/firefox/firefox"/>
1080        </condition>
1081        <condition property="browser" value="/opt/csw/bin/firefox">
1082            <available file="/opt/csw/bin/firefox"/>
1083        </condition>
1084        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
1085            <available file="/usr/sfw/lib/mozilla/mozilla"/>
1086        </condition>
1087        <condition property="browser" value="/opt/csw/bin/mozilla">
1088            <available file="/opt/csw/bin/mozilla"/>
1089        </condition>
1090    </target>
1091    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
1092        <fail unless="browser">
1093                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
1094                </fail>
1095        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
1096        <echo>Launching ${browse.url}</echo>
1097        <exec executable="${browser}" spawn="true">
1098            <arg line="${browser.args} ${browse.url}"/>
1099        </exec>
1100    </target>
1101    <target depends="init,-init-cos,compile-single" name="run-main">
1102        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1103        <webproject1:java classname="${run.class}"/>
1104    </target>
1105    <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
1106        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1107        <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
1108    </target>
1109    <target depends="init" if="netbeans.home" name="-do-update-breakpoints">
1110        <webproject1:nbjpdaappreloaded/>
1111    </target>
1112    <!--
1113                DEBUGGING SECTION
1114            -->
1115    <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">
1116        <nbstartserver debugmode="true"/>
1117        <antcall target="connect-debugger"/>
1118        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
1119        <antcall target="debug-display-browser"/>
1120        <antcall target="connect-client-debugger"/>
1121    </target>
1122    <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
1123        <condition property="listeningcp" value="sourcepath">
1124            <istrue value="${j2ee.compile.on.save}"/>
1125        </condition>
1126        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" listeningcp="${listeningcp}" name="${name}" transport="${jpda.transport}">
1127            <classpath>
1128                <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
1129            </classpath>
1130            <sourcepath>
1131                <path path="${web.docbase.dir}"/>
1132            </sourcepath>
1133        </nbjpdaconnect>
1134    </target>
1135    <target if="do.display.browser.debug" name="debug-display-browser">
1136        <nbbrowse url="${client.url}"/>
1137    </target>
1138    <target if="do.debug.client" name="connect-client-debugger">
1139        <webproject1:nbjsdebugstart webUrl="${client.url}"/>
1140    </target>
1141    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
1142        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1143        <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
1144    </target>
1145    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
1146    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
1147    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
1148        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
1149    </target>
1150    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
1151        <webproject1:nbjpdastart name="${debug.class}"/>
1152    </target>
1153    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
1154        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1155        <webproject1:debug classname="${debug.class}"/>
1156    </target>
1157    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
1158    <target depends="init" name="-pre-debug-fix">
1159        <fail unless="fix.includes">Must set fix.includes</fail>
1160        <property name="javac.includes" value="${fix.includes}.java"/>
1161    </target>
1162    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1163        <webproject1:nbjpdareload/>
1164    </target>
1165    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1166    <!--
1167            =================
1168            PROFILING SECTION
1169            =================
1170            -->
1171    <!--
1172                pre NB7.2 profiling section; consider it deprecated
1173            -->
1174    <target description="Profile a J2EE project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
1175        <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
1176            <isset property="profiler.info.jvmargs.extra"/>
1177        </condition>
1178        <antcall target="${profiler.startserver.target}"/>
1179        <antcall target="run"/>
1180        <antcall target="-profile-start-loadgen"/>
1181    </target>
1182    <target if="profiler.info.jvmargs.agent" name="start-profiled-server">
1183        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
1184            <jvmarg value="${profiler.info.jvmargs.agent}"/>
1185            <jvmarg value="${profiler.j2ee.agentID}"/>
1186        </nbstartprofiledserver>
1187    </target>
1188    <target if="profiler.info.jvmargs.agent" name="start-profiled-server-extraargs">
1189        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
1190            <jvmarg value="${profiler.info.jvmargs.extra}"/>
1191            <jvmarg value="${profiler.info.jvmargs.agent}"/>
1192            <jvmarg value="${profiler.j2ee.agentID}"/>
1193        </nbstartprofiledserver>
1194    </target>
1195    <target if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1196        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1197        <nbprofiledirect>
1198            <classpath>
1199                <path path="${run.test.classpath}"/>
1200                <path path="${j2ee.platform.classpath}"/>
1201            </classpath>
1202        </nbprofiledirect>
1203        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
1204            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1205            <jvmarg value="${profiler.info.jvmargs.agent}"/>
1206            <jvmarg line="${profiler.info.jvmargs}"/>
1207            <test name="${profile.class}"/>
1208            <classpath>
1209                <path path="${run.test.classpath}"/>
1210                <path path="${j2ee.platform.classpath}"/>
1211            </classpath>
1212            <syspropertyset>
1213                <propertyref prefix="test-sys-prop."/>
1214                <mapper from="test-sys-prop.*" to="*" type="glob"/>
1215            </syspropertyset>
1216            <formatter type="brief" usefile="false"/>
1217            <formatter type="xml"/>
1218        </junit>
1219    </target>
1220    <target if="netbeans.home" name="-profile-check">
1221        <condition property="profiler.configured">
1222            <or>
1223                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
1224                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
1225            </or>
1226        </condition>
1227    </target>
1228    <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">
1229        <startprofiler/>
1230        <nbstartserver profilemode="true"/>
1231        <nbdeploy clientUrlPart="${client.urlPart}" forceRedeploy="true" profilemode="true"/>
1232        <antcall target="debug-display-browser"/>
1233        <antcall target="-profile-start-loadgen"/>
1234    </target>
1235    <target depends="-profile-check,-profile-pre72" description="Profile a J2EE project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1236        <antcall target="-do-profile"/>
1237    </target>
1238    <target depends="-profile-test-single-pre72" name="profile-test-single"/>
1239    <target depends="-profile-check" if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs.agent">
1240        <startprofiler/>
1241        <antcall target="test-single"/>
1242    </target>
1243    <target if="profiler.loadgen.path" name="-profile-start-loadgen">
1244        <loadgenstart path="${profiler.loadgen.path}"/>
1245    </target>
1246    <!--
1247                JAVADOC SECTION
1248            -->
1249    <target depends="init" if="have.sources" name="javadoc-build">
1250        <mkdir dir="${dist.javadoc.dir}"/>
1251        <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}">
1252            <classpath>
1253                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
1254            </classpath>
1255            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1256                <filename name="**/*.java"/>
1257            </fileset>
1258            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1259                <include name="**/*.java"/>
1260            </fileset>
1261        </javadoc>
1262        <copy todir="${dist.javadoc.dir}">
1263            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1264                <filename name="**/doc-files/**"/>
1265            </fileset>
1266            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1267                <include name="**/doc-files/**"/>
1268            </fileset>
1269        </copy>
1270    </target>
1271    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
1272        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1273    </target>
1274    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
1275    <!--
1276               
1277                TEST COMPILATION SECTION
1278            -->
1279    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1280        <mkdir dir="${build.test.classes.dir}"/>
1281        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
1282    </target>
1283    <target name="-pre-compile-test">
1284        <!-- Empty placeholder for easier customization. -->
1285        <!-- You can override this target in the ../build.xml file. -->
1286    </target>
1287    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
1288        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1289        <copy todir="${build.test.classes.dir}">
1290            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1291        </copy>
1292    </target>
1293    <target name="-post-compile-test">
1294        <!-- Empty placeholder for easier customization. -->
1295        <!-- You can override this target in the ../build.xml file. -->
1296    </target>
1297    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1298    <target name="-pre-compile-test-single">
1299        <!-- Empty placeholder for easier customization. -->
1300        <!-- You can override this target in the ../build.xml file. -->
1301    </target>
1302    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1303        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1304        <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}"/>
1305        <copy todir="${build.test.classes.dir}">
1306            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1307        </copy>
1308    </target>
1309    <target name="-post-compile-test-single">
1310        <!-- Empty placeholder for easier customization. -->
1311        <!-- You can override this target in the ../build.xml file. -->
1312    </target>
1313    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
1314    <!--
1315               
1316                TEST EXECUTION SECTION
1317            -->
1318    <target depends="init" if="have.tests" name="-pre-test-run">
1319        <mkdir dir="${build.test.results.dir}"/>
1320    </target>
1321    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
1322        <webproject2:test testincludes="**/*Test.java"/>
1323    </target>
1324    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1325        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1326    </target>
1327    <target depends="init" if="have.tests" name="test-report"/>
1328    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1329    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1330    <target depends="init" if="have.tests" name="-pre-test-run-single">
1331        <mkdir dir="${build.test.results.dir}"/>
1332    </target>
1333    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1334        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1335        <webproject2:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1336    </target>
1337    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1338        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1339    </target>
1340    <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"/>
1341    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1342        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1343        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1344        <webproject2:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
1345    </target>
1346    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
1347        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1348    </target>
1349    <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"/>
1350    <!--
1351               
1352                TEST DEBUGGING SECTION
1353            -->
1354    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
1355        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1356        <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
1357    </target>
1358    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
1359        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1360        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1361        <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
1362    </target>
1363    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1364        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1365    </target>
1366    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1367    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1368    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1369        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1370    </target>
1371    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1372    <!--
1373               
1374                CLEANUP SECTION
1375            -->
1376    <target depends="init" name="deps-clean" unless="no.deps"/>
1377    <target depends="init" name="do-clean">
1378        <condition property="build.dir.to.clean" value="${build.web.dir}">
1379            <isset property="dist.ear.dir"/>
1380        </condition>
1381        <property name="build.dir.to.clean" value="${build.web.dir}"/>
1382        <delete includeEmptyDirs="true" quiet="true">
1383            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
1384        </delete>
1385        <delete dir="${build.dir}"/>
1386        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
1387        <delete dir="${dist.dir}"/>
1388    </target>
1389    <target depends="do-clean" if="status.clean-failed" name="check-clean">
1390        <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
1391        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
1392    </target>
1393    <target depends="init" if="netbeans.home" name="undeploy-clean">
1394        <nbundeploy failOnError="false" startServer="false"/>
1395    </target>
1396    <target name="-post-clean">
1397        <!-- Empty placeholder for easier customization. -->
1398        <!-- You can override this target in the ../build.xml file. -->
1399    </target>
1400    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
1401    <target depends="clean" description="Clean build products." name="clean-ear"/>
1402</project>
Note: See TracBrowser for help on using the repository browser.