source: trunk/projects/EJBHessianFHT/nbproject/build-impl.xml @ 7173

Revision 7173, 52.9 KB checked in by rlentz, 9 years ago (diff)

Demo using EJB components on Glassfish, supporting multi-language integration within ImageJ. Feature integration examples include OpenCL integration with Java using JOCL.

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        - junit compilation
15        - junit execution
16        - junit 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="EJBHessianFHT-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            <length length="0" string="${endorsed.classpath}" when="greater"/>
177        </condition>
178    </target>
179    <target depends="init" name="-init-cos" unless="deploy.on.save">
180        <condition property="deploy.on.save" value="true">
181            <istrue value="${j2ee.deploy.on.save}"/>
182        </condition>
183    </target>
184    <target name="-post-init">
185        <!-- Empty placeholder for easier customization. -->
186        <!-- You can override this target in the ../build.xml file. -->
187    </target>
188    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
189        <fail unless="src.dir">Must set src.dir</fail>
190        <fail unless="test.src.dir">Must set test.src.dir</fail>
191        <fail unless="build.dir">Must set build.dir</fail>
192        <fail unless="build.web.dir">Must set build.web.dir</fail>
193        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
194        <fail unless="dist.dir">Must set dist.dir</fail>
195        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
196        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
197        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
198        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
199        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
200        <fail unless="dist.war">Must set dist.war</fail>
201        <condition property="missing.j2ee.server.home">
202            <and>
203                <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>
204                <not>
205                    <isset property="j2ee.server.home"/>
206                </not>
207            </and>
208        </condition>
209        <fail if="missing.j2ee.server.home">
210The Java EE server classpath is not correctly set up - server home directory is missing.
211Either open the project in the IDE and assign the server or setup the server classpath manually.
212For example like this:
213   ant -Dj2ee.server.home=&lt;app_server_installation_directory&gt;
214                </fail>
215        <fail unless="j2ee.platform.classpath">
216The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
217Either open the project in the IDE and assign the server or setup the server classpath manually.
218For example like this:
219   ant -Duser.properties.file=&lt;path_to_property_file&gt; (where you put the property "j2ee.platform.classpath" in a .properties file)
220or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties file is used)
221                </fail>
222    </target>
223    <target name="-init-macrodef-property">
224        <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
225            <attribute name="name"/>
226            <attribute name="value"/>
227            <sequential>
228                <property name="@{name}" value="${@{value}}"/>
229            </sequential>
230        </macrodef>
231    </target>
232    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
233        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
234            <attribute default="${src.dir}" name="srcdir"/>
235            <attribute default="${build.classes.dir}" name="destdir"/>
236            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
237            <attribute default="${javac.processorpath}" name="processorpath"/>
238            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
239            <attribute default="${includes}" name="includes"/>
240            <attribute default="${excludes}" name="excludes"/>
241            <attribute default="${javac.debug}" name="debug"/>
242            <attribute default="${empty.dir}" name="gensrcdir"/>
243            <element name="customize" optional="true"/>
244            <sequential>
245                <property location="${build.dir}/empty" name="empty.dir"/>
246                <mkdir dir="${empty.dir}"/>
247                <mkdir dir="@{apgeneratedsrcdir}"/>
248                <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}">
249                    <src>
250                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
251                            <include name="*"/>
252                        </dirset>
253                    </src>
254                    <classpath>
255                        <path path="@{classpath}"/>
256                    </classpath>
257                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
258                    <compilerarg line="${javac.compilerargs}"/>
259                    <compilerarg value="-processorpath"/>
260                    <compilerarg path="@{processorpath}:${empty.dir}"/>
261                    <compilerarg line="${ap.processors.internal}"/>
262                    <compilerarg value="-s"/>
263                    <compilerarg path="@{apgeneratedsrcdir}"/>
264                    <compilerarg line="${ap.proc.none.internal}"/>
265                    <customize/>
266                </javac>
267            </sequential>
268        </macrodef>
269    </target>
270    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
271        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
272            <attribute default="${src.dir}" name="srcdir"/>
273            <attribute default="${build.classes.dir}" name="destdir"/>
274            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
275            <attribute default="${javac.processorpath}" name="processorpath"/>
276            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
277            <attribute default="${includes}" name="includes"/>
278            <attribute default="${excludes}" name="excludes"/>
279            <attribute default="${javac.debug}" name="debug"/>
280            <attribute default="${empty.dir}" name="gensrcdir"/>
281            <element name="customize" optional="true"/>
282            <sequential>
283                <property location="${build.dir}/empty" name="empty.dir"/>
284                <mkdir dir="${empty.dir}"/>
285                <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}">
286                    <src>
287                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
288                            <include name="*"/>
289                        </dirset>
290                    </src>
291                    <classpath>
292                        <path path="@{classpath}"/>
293                    </classpath>
294                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
295                    <compilerarg line="${javac.compilerargs}"/>
296                    <customize/>
297                </javac>
298            </sequential>
299        </macrodef>
300    </target>
301    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
302        <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2">
303            <attribute default="${src.dir}" name="srcdir"/>
304            <attribute default="${build.classes.dir}" name="destdir"/>
305            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
306            <sequential>
307                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
308                    <classpath>
309                        <path path="@{classpath}"/>
310                    </classpath>
311                </depend>
312            </sequential>
313        </macrodef>
314        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2">
315            <attribute default="${build.classes.dir}" name="destdir"/>
316            <sequential>
317                <fail unless="javac.includes">Must set javac.includes</fail>
318                <pathconvert pathsep="," property="javac.includes.binary">
319                    <path>
320                        <filelist dir="@{destdir}" files="${javac.includes}"/>
321                    </path>
322                    <globmapper from="*.java" to="*.class"/>
323                </pathconvert>
324                <delete>
325                    <files includes="${javac.includes.binary}"/>
326                </delete>
327            </sequential>
328        </macrodef>
329    </target>
330    <target name="-init-macrodef-junit">
331        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
332            <attribute default="${includes}" name="includes"/>
333            <attribute default="${excludes}" name="excludes"/>
334            <attribute default="**" name="testincludes"/>
335            <sequential>
336                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
337                    <batchtest todir="${build.test.results.dir}">
338                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
339                            <filename name="@{testincludes}"/>
340                        </fileset>
341                    </batchtest>
342                    <classpath>
343                        <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
344                    </classpath>
345                    <syspropertyset>
346                        <propertyref prefix="test-sys-prop."/>
347                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
348                    </syspropertyset>
349                    <formatter type="brief" usefile="false"/>
350                    <formatter type="xml"/>
351                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
352                    <jvmarg line="${runmain.jvmargs}"/>
353                </junit>
354            </sequential>
355        </macrodef>
356    </target>
357    <target name="-init-macrodef-java">
358        <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
359            <attribute default="${main.class}" name="classname"/>
360            <attribute default="${debug.classpath}" name="classpath"/>
361            <element name="customize" optional="true"/>
362            <sequential>
363                <java classname="@{classname}" fork="true">
364                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
365                    <jvmarg line="${runmain.jvmargs}"/>
366                    <classpath>
367                        <path path="@{classpath}:${j2ee.platform.classpath}"/>
368                    </classpath>
369                    <syspropertyset>
370                        <propertyref prefix="run-sys-prop."/>
371                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
372                    </syspropertyset>
373                    <customize/>
374                </java>
375            </sequential>
376        </macrodef>
377    </target>
378    <target name="-init-macrodef-nbjsdebug">
379        <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
380            <attribute default="${client.url}" name="webUrl"/>
381            <sequential>
382                <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
383            </sequential>
384        </macrodef>
385    </target>
386    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
387        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
388            <attribute default="${main.class}" name="name"/>
389            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
390            <sequential>
391                <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
392                    <classpath>
393                        <path path="@{classpath}"/>
394                    </classpath>
395                </nbjpdastart>
396            </sequential>
397        </macrodef>
398        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
399            <attribute default="${build.classes.dir}" name="dir"/>
400            <sequential>
401                <nbjpdareload>
402                    <fileset dir="@{dir}" includes="${fix.classes}">
403                        <include name="${fix.includes}*.class"/>
404                    </fileset>
405                </nbjpdareload>
406            </sequential>
407        </macrodef>
408        <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
409            <sequential>
410                <nbjpdaappreloaded/>
411            </sequential>
412        </macrodef>
413    </target>
414    <target name="-init-debug-args">
415        <property name="version-output" value="java version &quot;${ant.java.version}"/>
416        <condition property="have-jdk-older-than-1.4">
417            <or>
418                <contains string="${version-output}" substring="java version &quot;1.0"/>
419                <contains string="${version-output}" substring="java version &quot;1.1"/>
420                <contains string="${version-output}" substring="java version &quot;1.2"/>
421                <contains string="${version-output}" substring="java version &quot;1.3"/>
422            </or>
423        </condition>
424        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
425            <istrue value="${have-jdk-older-than-1.4}"/>
426        </condition>
427        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
428            <os family="windows"/>
429        </condition>
430        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
431            <isset property="debug.transport"/>
432        </condition>
433    </target>
434    <target depends="-init-debug-args" name="-init-macrodef-debug">
435        <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
436            <attribute default="${main.class}" name="classname"/>
437            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
438            <attribute default="${application.args.param}" name="args"/>
439            <element name="customize" optional="true"/>
440            <sequential>
441                <java classname="@{classname}" fork="true">
442                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
443                    <jvmarg line="${debug-args-line}"/>
444                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
445                    <jvmarg line="${runmain.jvmargs}"/>
446                    <classpath>
447                        <path path="@{classpath}"/>
448                    </classpath>
449                    <syspropertyset>
450                        <propertyref prefix="run-sys-prop."/>
451                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
452                    </syspropertyset>
453                    <arg line="@{args}"/>
454                    <customize/>
455                </java>
456            </sequential>
457        </macrodef>
458    </target>
459    <target name="-init-taskdefs">
460        <fail unless="libs.CopyLibs.classpath">
461The libs.CopyLibs.classpath property is not set up.
462This property must point to
463org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
464of NetBeans IDE installation and is usually located at
465&lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
466Either open the project in the IDE and make sure CopyLibs library
467exists or setup the property manually. For example like this:
468 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
469                </fail>
470        <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
471    </target>
472    <target name="-init-ap-cmdline-properties">
473        <property name="annotation.processing.enabled" value="true"/>
474        <property name="annotation.processing.processors.list" value=""/>
475        <property name="annotation.processing.run.all.processors" value="true"/>
476        <property name="javac.processorpath" value="${javac.classpath}"/>
477        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
478        <condition property="ap.supported.internal" value="true">
479            <not>
480                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
481            </not>
482        </condition>
483    </target>
484    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
485        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
486            <isfalse value="${annotation.processing.run.all.processors}"/>
487        </condition>
488        <condition else="" property="ap.proc.none.internal" value="-proc:none">
489            <isfalse value="${annotation.processing.enabled}"/>
490        </condition>
491    </target>
492    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
493        <property name="ap.cmd.line.internal" value=""/>
494    </target>
495    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
496    <!--
497                COMPILATION SECTION
498            -->
499    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps">
500        <ant antfile="${project.imagejdevapi}/build.xml" inheritall="false" target="jar">
501            <property name="deploy.on.save" value="false"/>
502        </ant>
503    </target>
504    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
505        <ant antfile="${project.imagejdevapi}/build.xml" inheritall="false" target="jar">
506            <property name="deploy.on.save" value="false"/>
507        </ant>
508    </target>
509    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
510    <target depends="init,deps-jar" name="-pre-pre-compile">
511        <mkdir dir="${build.classes.dir}"/>
512    </target>
513    <target name="-pre-compile">
514        <!-- Empty placeholder for easier customization. -->
515        <!-- You can override this target in the ../build.xml file. -->
516    </target>
517    <target name="-copy-webdir">
518        <copy todir="${build.web.dir}">
519            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
520        </copy>
521        <copy todir="${build.web.dir}/WEB-INF">
522            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
523        </copy>
524    </target>
525    <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">
526        <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
527        <copy todir="${build.classes.dir}">
528            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
529        </copy>
530    </target>
531    <target if="has.custom.manifest" name="-copy-manifest">
532        <mkdir dir="${build.meta.inf.dir}"/>
533        <copy todir="${build.meta.inf.dir}">
534            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
535        </copy>
536    </target>
537    <target if="has.persistence.xml" name="-copy-persistence-xml">
538        <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
539        <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
540            <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
541        </copy>
542    </target>
543    <target name="-post-compile">
544        <!-- Empty placeholder for easier customization. -->
545        <!-- You can override this target in the ../build.xml file. -->
546    </target>
547    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
548    <target name="-pre-compile-single">
549        <!-- Empty placeholder for easier customization. -->
550        <!-- You can override this target in the ../build.xml file. -->
551    </target>
552    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
553        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
554        <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
555        <copy todir="${build.classes.dir}">
556            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
557        </copy>
558    </target>
559    <target name="-post-compile-single">
560        <!-- Empty placeholder for easier customization. -->
561        <!-- You can override this target in the ../build.xml file. -->
562    </target>
563    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
564    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
565        <mkdir dir="${build.generated.dir}/src"/>
566        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
567            <arg value="-uriroot"/>
568            <arg file="${basedir}/${build.web.dir}"/>
569            <arg value="-d"/>
570            <arg file="${basedir}/${build.generated.dir}/src"/>
571            <arg value="-die1"/>
572            <arg value="-compilerSourceVM ${javac.source}"/>
573            <arg value="-compilerTargetVM ${javac.target}"/>
574            <arg value="-javaEncoding ${source.encoding}"/>
575            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
576        </java>
577        <mkdir dir="${build.generated.dir}/classes"/>
578        <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"/>
579    </target>
580    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
581        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
582        <mkdir dir="${build.generated.dir}/src"/>
583        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
584            <arg value="-uriroot"/>
585            <arg file="${basedir}/${build.web.dir}"/>
586            <arg value="-d"/>
587            <arg file="${basedir}/${build.generated.dir}/src"/>
588            <arg value="-die1"/>
589            <arg value="-jspc.files"/>
590            <arg path="${jsp.includes}"/>
591            <arg value="-compilerSourceVM ${javac.source}"/>
592            <arg value="-compilerTargetVM ${javac.target}"/>
593            <arg value="-javaEncoding ${source.encoding}"/>
594            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
595        </java>
596        <mkdir dir="${build.generated.dir}/classes"/>
597        <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">
598            <customize>
599                <patternset includes="${javac.jsp.includes}"/>
600            </customize>
601        </webproject2:javac>
602    </target>
603    <target name="compile-single-jsp">
604        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
605        <antcall target="-do-compile-single-jsp"/>
606    </target>
607    <!--
608                DIST BUILDING SECTION
609            -->
610    <target name="-pre-dist">
611        <!-- Empty placeholder for easier customization. -->
612        <!-- You can override this target in the ../build.xml file. -->
613    </target>
614    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
615        <dirname file="${dist.war}" property="dist.jar.dir"/>
616        <mkdir dir="${dist.jar.dir}"/>
617        <jar compress="${jar.compress}" jarfile="${dist.war}">
618            <fileset dir="${build.web.dir}"/>
619        </jar>
620    </target>
621    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
622        <dirname file="${dist.war}" property="dist.jar.dir"/>
623        <mkdir dir="${dist.jar.dir}"/>
624        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
625            <fileset dir="${build.web.dir}"/>
626        </jar>
627    </target>
628    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
629        <dirname file="${dist.war}" property="dist.jar.dir"/>
630        <mkdir dir="${dist.jar.dir}"/>
631        <jar compress="${jar.compress}" jarfile="${dist.war}">
632            <fileset dir="${build.web.dir}"/>
633        </jar>
634    </target>
635    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
636        <dirname file="${dist.war}" property="dist.jar.dir"/>
637        <mkdir dir="${dist.jar.dir}"/>
638        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
639            <fileset dir="${build.web.dir}"/>
640        </jar>
641    </target>
642    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
643    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
644        <copyfiles files="${file.reference.hessian-4.0.7.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
645        <copyfiles files="${file.reference.jocl.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
646        <copyfiles files="${file.reference.gluegen-rt.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
647        <copyfiles files="${file.reference.fht.cl}" todir="${build.web.dir}//"/>
648        <copyfiles files="${file.reference.gluegen-rt.jar}" todir="${build.web.dir}//"/>
649        <mkdir dir="${build.web.dir}/META-INF"/>
650        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
651    </target>
652    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
653        <copyfiles files="${file.reference.hessian-4.0.7.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
654        <copyfiles files="${file.reference.jocl.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
655        <copyfiles files="${file.reference.gluegen-rt.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
656        <copyfiles files="${file.reference.fht.cl}" todir="${build.web.dir}//"/>
657        <copyfiles files="${file.reference.gluegen-rt.jar}" todir="${build.web.dir}//"/>
658    </target>
659    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
660        <delete dir="${build.web.dir}/WEB-INF/lib"/>
661    </target>
662    <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
663        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
664        <mkdir dir="${dist.jar.dir}"/>
665        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
666            <fileset dir="${build.web.dir}"/>
667        </jar>
668    </target>
669    <target name="-post-dist">
670        <!-- Empty placeholder for easier customization. -->
671        <!-- You can override this target in the ../build.xml file. -->
672    </target>
673    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
674    <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"/>
675    <!--
676                EXECUTION SECTION
677            -->
678    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
679    <target name="-pre-run-deploy">
680        <!-- Empty placeholder for easier customization. -->
681        <!-- You can override this target in the ../build.xml file. -->
682    </target>
683    <target name="-post-run-deploy">
684        <!-- Empty placeholder for easier customization. -->
685        <!-- You can override this target in the ../build.xml file. -->
686    </target>
687    <target name="-pre-nbmodule-run-deploy">
688        <!-- Empty placeholder for easier customization. -->
689        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
690    </target>
691    <target name="-post-nbmodule-run-deploy">
692        <!-- Empty placeholder for easier customization. -->
693        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
694    </target>
695    <target name="-run-deploy-am">
696        <!-- Task to deploy to the Access Manager runtime. -->
697    </target>
698    <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy" name="run-deploy">
699        <nbjpdaappreloaded/>
700    </target>
701    <target if="netbeans.home" name="-run-deploy-nb">
702        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
703    </target>
704    <target name="-init-deploy-ant" unless="netbeans.home">
705        <property name="deploy.ant.archive" value="${dist.war}"/>
706        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
707        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
708        <property name="deploy.ant.enabled" value="true"/>
709    </target>
710    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
711    <target if="netbeans.home" name="-run-undeploy-nb">
712        <fail message="Undeploy is not supported from within the IDE"/>
713    </target>
714    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
715        <nbverify file="${dist.war}"/>
716    </target>
717    <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
718    <target if="do.display.browser" name="-init-display-browser">
719        <condition property="do.display.browser.nb">
720            <isset property="netbeans.home"/>
721        </condition>
722        <condition property="do.display.browser.cl">
723            <isset property="deploy.ant.enabled"/>
724        </condition>
725    </target>
726    <target if="do.display.browser.nb" name="-display-browser-nb">
727        <nbbrowse url="${client.url}"/>
728    </target>
729    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
730        <condition property="browser" value="rundll32">
731            <os family="windows"/>
732        </condition>
733        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
734            <os family="windows"/>
735        </condition>
736        <condition property="browser" value="/usr/bin/open">
737            <os family="mac"/>
738        </condition>
739        <property environment="env"/>
740        <condition property="browser" value="${env.BROWSER}">
741            <isset property="env.BROWSER"/>
742        </condition>
743        <condition property="browser" value="/usr/bin/firefox">
744            <available file="/usr/bin/firefox"/>
745        </condition>
746        <condition property="browser" value="/usr/local/firefox/firefox">
747            <available file="/usr/local/firefox/firefox"/>
748        </condition>
749        <condition property="browser" value="/usr/bin/mozilla">
750            <available file="/usr/bin/mozilla"/>
751        </condition>
752        <condition property="browser" value="/usr/local/mozilla/mozilla">
753            <available file="/usr/local/mozilla/mozilla"/>
754        </condition>
755        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
756            <available file="/usr/sfw/lib/firefox/firefox"/>
757        </condition>
758        <condition property="browser" value="/opt/csw/bin/firefox">
759            <available file="/opt/csw/bin/firefox"/>
760        </condition>
761        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
762            <available file="/usr/sfw/lib/mozilla/mozilla"/>
763        </condition>
764        <condition property="browser" value="/opt/csw/bin/mozilla">
765            <available file="/opt/csw/bin/mozilla"/>
766        </condition>
767    </target>
768    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
769        <fail unless="browser">
770                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
771                </fail>
772        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
773        <echo>Launching ${browse.url}</echo>
774        <exec executable="${browser}" spawn="true">
775            <arg line="${browser.args} ${browse.url}"/>
776        </exec>
777    </target>
778    <target depends="init,-init-cos,compile-single" name="run-main">
779        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
780        <webproject1:java classname="${run.class}"/>
781    </target>
782    <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
783        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
784        <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
785    </target>
786    <!--
787                DEBUGGING SECTION
788            -->
789    <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">
790        <nbstartserver debugmode="true"/>
791        <antcall target="connect-debugger"/>
792        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
793        <antcall target="debug-display-browser"/>
794        <antcall target="connect-client-debugger"/>
795    </target>
796    <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
797        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
798            <classpath>
799                <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
800            </classpath>
801            <sourcepath>
802                <path path="${web.docbase.dir}"/>
803            </sourcepath>
804        </nbjpdaconnect>
805    </target>
806    <target if="do.display.browser.debug" name="debug-display-browser">
807        <nbbrowse url="${client.url}"/>
808    </target>
809    <target if="do.debug.client" name="connect-client-debugger">
810        <webproject1:nbjsdebugstart webUrl="${client.url}"/>
811    </target>
812    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
813        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
814        <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
815    </target>
816    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
817    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
818    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
819        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
820    </target>
821    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
822        <webproject1:nbjpdastart name="${debug.class}"/>
823    </target>
824    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
825        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
826        <webproject1:debug classname="${debug.class}"/>
827    </target>
828    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
829    <target depends="init" name="-pre-debug-fix">
830        <fail unless="fix.includes">Must set fix.includes</fail>
831        <property name="javac.includes" value="${fix.includes}.java"/>
832    </target>
833    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
834        <webproject1:nbjpdareload/>
835    </target>
836    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
837    <!--
838                JAVADOC SECTION
839            -->
840    <target depends="init" if="have.sources" name="javadoc-build">
841        <mkdir dir="${dist.javadoc.dir}"/>
842        <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}">
843            <classpath>
844                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
845            </classpath>
846            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
847                <filename name="**/*.java"/>
848            </fileset>
849            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
850                <include name="**/*.java"/>
851            </fileset>
852        </javadoc>
853        <copy todir="${dist.javadoc.dir}">
854            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
855                <filename name="**/doc-files/**"/>
856            </fileset>
857            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
858                <include name="**/doc-files/**"/>
859            </fileset>
860        </copy>
861    </target>
862    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
863        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
864    </target>
865    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
866    <!--
867               
868                JUNIT COMPILATION SECTION
869            -->
870    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
871        <mkdir dir="${build.test.classes.dir}"/>
872        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
873    </target>
874    <target name="-pre-compile-test">
875        <!-- Empty placeholder for easier customization. -->
876        <!-- You can override this target in the ../build.xml file. -->
877    </target>
878    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
879        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
880        <copy todir="${build.test.classes.dir}">
881            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
882        </copy>
883    </target>
884    <target name="-post-compile-test">
885        <!-- Empty placeholder for easier customization. -->
886        <!-- You can override this target in the ../build.xml file. -->
887    </target>
888    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
889    <target name="-pre-compile-test-single">
890        <!-- Empty placeholder for easier customization. -->
891        <!-- You can override this target in the ../build.xml file. -->
892    </target>
893    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
894        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
895        <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}"/>
896        <copy todir="${build.test.classes.dir}">
897            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
898        </copy>
899    </target>
900    <target name="-post-compile-test-single">
901        <!-- Empty placeholder for easier customization. -->
902        <!-- You can override this target in the ../build.xml file. -->
903    </target>
904    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
905    <!--
906               
907                JUNIT EXECUTION SECTION
908            -->
909    <target depends="init" if="have.tests" name="-pre-test-run">
910        <mkdir dir="${build.test.results.dir}"/>
911    </target>
912    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
913        <webproject2:junit testincludes="**/*Test.java"/>
914    </target>
915    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
916        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
917    </target>
918    <target depends="init" if="have.tests" name="test-report"/>
919    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
920    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
921    <target depends="init" if="have.tests" name="-pre-test-run-single">
922        <mkdir dir="${build.test.results.dir}"/>
923    </target>
924    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
925        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
926        <webproject2:junit excludes="" includes="${test.includes}"/>
927    </target>
928    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
929        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
930    </target>
931    <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"/>
932    <!--
933               
934                JUNIT DEBUGGING SECTION
935            -->
936    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
937        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
938        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
939        <delete file="${test.report.file}"/>
940        <!-- must exist, otherwise the XML formatter would fail -->
941        <mkdir dir="${build.test.results.dir}"/>
942        <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
943            <customize>
944                <arg value="showoutput=true"/>
945                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
946                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
947            </customize>
948        </webproject1:debug>
949    </target>
950    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
951        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
952    </target>
953    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
954    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
955        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
956    </target>
957    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
958    <!--
959               
960                CLEANUP SECTION
961            -->
962    <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps">
963        <ant antfile="${project.imagejdevapi}/build.xml" inheritall="false" target="clean"/>
964    </target>
965    <target depends="init" name="do-clean">
966        <condition property="build.dir.to.clean" value="${build.web.dir}">
967            <isset property="dist.ear.dir"/>
968        </condition>
969        <property name="build.dir.to.clean" value="${build.web.dir}"/>
970        <delete includeEmptyDirs="true" quiet="true">
971            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
972        </delete>
973        <delete dir="${build.dir}"/>
974        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
975        <delete dir="${dist.dir}"/>
976    </target>
977    <target depends="do-clean" if="status.clean-failed" name="check-clean">
978        <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
979        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
980    </target>
981    <target depends="init" if="netbeans.home" name="undeploy-clean">
982        <nbundeploy failOnError="false" startServer="false"/>
983    </target>
984    <target name="-post-clean">
985        <!-- Empty placeholder for easier customization. -->
986        <!-- You can override this target in the ../build.xml file. -->
987    </target>
988    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
989    <target depends="clean" description="Clean build products." name="clean-ear"/>
990</project>
Note: See TracBrowser for help on using the repository browser.