Project

General

Profile

Statistics
| Revision:

root / trunk / src / nbproject / build-impl.xml @ 7

History | View | Annotate | Download (53.6 KB)

1 7 andrej.cim
<?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="LIDAR_SOAP-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">
210
The Java EE server classpath is not correctly set up - server home directory is missing.
211
Either open the project in the IDE and assign the server or setup the server classpath manually.
212
For example like this:
213
   ant -Dj2ee.server.home=&lt;app_server_installation_directory&gt;
214
                </fail>
215
        <fail unless="j2ee.platform.classpath">
216
The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
217
Either open the project in the IDE and assign the server or setup the server classpath manually.
218
For 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)
220
or 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">
461
The libs.CopyLibs.classpath property is not set up.
462
This property must point to
463
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
464
of NetBeans IDE installation and is usually located at
465
&lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
466
Either open the project in the IDE and make sure CopyLibs library
467
exists 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
    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
501
    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
502
    <target depends="init,deps-jar" name="-pre-pre-compile">
503
        <mkdir dir="${build.classes.dir}"/>
504
    </target>
505
    <target name="-pre-compile">
506
        <!-- Empty placeholder for easier customization. -->
507
        <!-- You can override this target in the ../build.xml file. -->
508
    </target>
509
    <target name="-copy-webdir">
510
        <copy todir="${build.web.dir}">
511
            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
512
        </copy>
513
        <copy todir="${build.web.dir}/WEB-INF">
514
            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
515
        </copy>
516
    </target>
517
    <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">
518
        <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
519
        <copy todir="${build.classes.dir}">
520
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
521
        </copy>
522
    </target>
523
    <target if="has.custom.manifest" name="-copy-manifest">
524
        <mkdir dir="${build.meta.inf.dir}"/>
525
        <copy todir="${build.meta.inf.dir}">
526
            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
527
        </copy>
528
    </target>
529
    <target if="has.persistence.xml" name="-copy-persistence-xml">
530
        <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
531
        <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
532
            <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
533
        </copy>
534
    </target>
535
    <target name="-post-compile">
536
        <!-- Empty placeholder for easier customization. -->
537
        <!-- You can override this target in the ../build.xml file. -->
538
    </target>
539
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
540
    <target name="-pre-compile-single">
541
        <!-- Empty placeholder for easier customization. -->
542
        <!-- You can override this target in the ../build.xml file. -->
543
    </target>
544
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
545
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
546
        <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
547
        <copy todir="${build.classes.dir}">
548
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
549
        </copy>
550
    </target>
551
    <target name="-post-compile-single">
552
        <!-- Empty placeholder for easier customization. -->
553
        <!-- You can override this target in the ../build.xml file. -->
554
    </target>
555
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
556
    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
557
        <mkdir dir="${build.generated.dir}/src"/>
558
        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
559
            <arg value="-uriroot"/>
560
            <arg file="${basedir}/${build.web.dir}"/>
561
            <arg value="-d"/>
562
            <arg file="${basedir}/${build.generated.dir}/src"/>
563
            <arg value="-die1"/>
564
            <arg value="-compilerSourceVM ${javac.source}"/>
565
            <arg value="-compilerTargetVM ${javac.target}"/>
566
            <arg value="-javaEncoding ${source.encoding}"/>
567
            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
568
        </java>
569
        <mkdir dir="${build.generated.dir}/classes"/>
570
        <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"/>
571
    </target>
572
    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
573
        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
574
        <mkdir dir="${build.generated.dir}/src"/>
575
        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
576
            <arg value="-uriroot"/>
577
            <arg file="${basedir}/${build.web.dir}"/>
578
            <arg value="-d"/>
579
            <arg file="${basedir}/${build.generated.dir}/src"/>
580
            <arg value="-die1"/>
581
            <arg value="-jspc.files"/>
582
            <arg path="${jsp.includes}"/>
583
            <arg value="-compilerSourceVM ${javac.source}"/>
584
            <arg value="-compilerTargetVM ${javac.target}"/>
585
            <arg value="-javaEncoding ${source.encoding}"/>
586
            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
587
        </java>
588
        <mkdir dir="${build.generated.dir}/classes"/>
589
        <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">
590
            <customize>
591
                <patternset includes="${javac.jsp.includes}"/>
592
            </customize>
593
        </webproject2:javac>
594
    </target>
595
    <target name="compile-single-jsp">
596
        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
597
        <antcall target="-do-compile-single-jsp"/>
598
    </target>
599
    <!--
600
                DIST BUILDING SECTION
601
            -->
602
    <target name="-pre-dist">
603
        <!-- Empty placeholder for easier customization. -->
604
        <!-- You can override this target in the ../build.xml file. -->
605
    </target>
606
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
607
        <dirname file="${dist.war}" property="dist.jar.dir"/>
608
        <mkdir dir="${dist.jar.dir}"/>
609
        <jar compress="${jar.compress}" jarfile="${dist.war}">
610
            <fileset dir="${build.web.dir}"/>
611
        </jar>
612
    </target>
613
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
614
        <dirname file="${dist.war}" property="dist.jar.dir"/>
615
        <mkdir dir="${dist.jar.dir}"/>
616
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
617
            <fileset dir="${build.web.dir}"/>
618
        </jar>
619
    </target>
620
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
621
        <dirname file="${dist.war}" property="dist.jar.dir"/>
622
        <mkdir dir="${dist.jar.dir}"/>
623
        <jar compress="${jar.compress}" jarfile="${dist.war}">
624
            <fileset dir="${build.web.dir}"/>
625
        </jar>
626
    </target>
627
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
628
        <dirname file="${dist.war}" property="dist.jar.dir"/>
629
        <mkdir dir="${dist.jar.dir}"/>
630
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
631
            <fileset dir="${build.web.dir}"/>
632
        </jar>
633
    </target>
634
    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
635
    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
636
        <copyfiles files="${libs.hibernate-support.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
637
        <copyfiles files="${libs.ejb3-persistence.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
638
        <copyfiles files="${file.reference.mysql-connector-java-5.1.6-bin.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
639
        <copyfiles files="${libs.metro.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
640
        <copyfiles files="${file.reference.gson-1.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
641
        <copyfiles files="${libs.JavaComm.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
642
        <copyfiles files="${file.reference.JPam-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
643
        <copyfiles files="${file.reference.commons-configuration-1.6.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
644
        <copyfiles files="${file.reference.commons-lang-2.5.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
645
        <copyfiles files="${file.reference.commons-collections-3.2.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
646
        <copyfiles files="${file.reference.gson-1.3.jar-1}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
647
        <mkdir dir="${build.web.dir}/META-INF"/>
648
        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
649
    </target>
650
    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
651
        <copyfiles files="${libs.hibernate-support.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
652
        <copyfiles files="${libs.ejb3-persistence.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
653
        <copyfiles files="${file.reference.mysql-connector-java-5.1.6-bin.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
654
        <copyfiles files="${libs.metro.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
655
        <copyfiles files="${file.reference.gson-1.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
656
        <copyfiles files="${libs.JavaComm.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
657
        <copyfiles files="${file.reference.JPam-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
658
        <copyfiles files="${file.reference.commons-configuration-1.6.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
659
        <copyfiles files="${file.reference.commons-lang-2.5.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
660
        <copyfiles files="${file.reference.commons-collections-3.2.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
661
        <copyfiles files="${file.reference.gson-1.3.jar-1}" todir="${build.web.dir}/WEB-INF/lib"/>
662
    </target>
663
    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
664
        <delete dir="${build.web.dir}/WEB-INF/lib"/>
665
    </target>
666
    <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
667
        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
668
        <mkdir dir="${dist.jar.dir}"/>
669
        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
670
            <fileset dir="${build.web.dir}"/>
671
        </jar>
672
    </target>
673
    <target name="-post-dist">
674
        <!-- Empty placeholder for easier customization. -->
675
        <!-- You can override this target in the ../build.xml file. -->
676
    </target>
677
    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
678
    <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"/>
679
    <!--
680
                EXECUTION SECTION
681
            -->
682
    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
683
    <target name="-pre-run-deploy">
684
        <!-- Empty placeholder for easier customization. -->
685
        <!-- You can override this target in the ../build.xml file. -->
686
    </target>
687
    <target name="-post-run-deploy">
688
        <!-- Empty placeholder for easier customization. -->
689
        <!-- You can override this target in the ../build.xml file. -->
690
    </target>
691
    <target name="-pre-nbmodule-run-deploy">
692
        <!-- Empty placeholder for easier customization. -->
693
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
694
    </target>
695
    <target name="-post-nbmodule-run-deploy">
696
        <!-- Empty placeholder for easier customization. -->
697
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
698
    </target>
699
    <target name="-run-deploy-am">
700
        <!-- Task to deploy to the Access Manager runtime. -->
701
    </target>
702
    <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">
703
        <nbjpdaappreloaded/>
704
    </target>
705
    <target if="netbeans.home" name="-run-deploy-nb">
706
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
707
    </target>
708
    <target name="-init-deploy-ant" unless="netbeans.home">
709
        <property name="deploy.ant.archive" value="${dist.war}"/>
710
        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
711
        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
712
        <property name="deploy.ant.enabled" value="true"/>
713
    </target>
714
    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
715
    <target if="netbeans.home" name="-run-undeploy-nb">
716
        <fail message="Undeploy is not supported from within the IDE"/>
717
    </target>
718
    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
719
        <nbverify file="${dist.war}"/>
720
    </target>
721
    <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
722
    <target if="do.display.browser" name="-init-display-browser">
723
        <condition property="do.display.browser.nb">
724
            <isset property="netbeans.home"/>
725
        </condition>
726
        <condition property="do.display.browser.cl">
727
            <isset property="deploy.ant.enabled"/>
728
        </condition>
729
    </target>
730
    <target if="do.display.browser.nb" name="-display-browser-nb">
731
        <nbbrowse url="${client.url}"/>
732
    </target>
733
    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
734
        <condition property="browser" value="rundll32">
735
            <os family="windows"/>
736
        </condition>
737
        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
738
            <os family="windows"/>
739
        </condition>
740
        <condition property="browser" value="/usr/bin/open">
741
            <os family="mac"/>
742
        </condition>
743
        <property environment="env"/>
744
        <condition property="browser" value="${env.BROWSER}">
745
            <isset property="env.BROWSER"/>
746
        </condition>
747
        <condition property="browser" value="/usr/bin/firefox">
748
            <available file="/usr/bin/firefox"/>
749
        </condition>
750
        <condition property="browser" value="/usr/local/firefox/firefox">
751
            <available file="/usr/local/firefox/firefox"/>
752
        </condition>
753
        <condition property="browser" value="/usr/bin/mozilla">
754
            <available file="/usr/bin/mozilla"/>
755
        </condition>
756
        <condition property="browser" value="/usr/local/mozilla/mozilla">
757
            <available file="/usr/local/mozilla/mozilla"/>
758
        </condition>
759
        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
760
            <available file="/usr/sfw/lib/firefox/firefox"/>
761
        </condition>
762
        <condition property="browser" value="/opt/csw/bin/firefox">
763
            <available file="/opt/csw/bin/firefox"/>
764
        </condition>
765
        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
766
            <available file="/usr/sfw/lib/mozilla/mozilla"/>
767
        </condition>
768
        <condition property="browser" value="/opt/csw/bin/mozilla">
769
            <available file="/opt/csw/bin/mozilla"/>
770
        </condition>
771
    </target>
772
    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
773
        <fail unless="browser">
774
                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
775
                </fail>
776
        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
777
        <echo>Launching ${browse.url}</echo>
778
        <exec executable="${browser}" spawn="true">
779
            <arg line="${browser.args} ${browse.url}"/>
780
        </exec>
781
    </target>
782
    <target depends="init,-init-cos,compile-single" name="run-main">
783
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
784
        <webproject1:java classname="${run.class}"/>
785
    </target>
786
    <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
787
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
788
        <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
789
    </target>
790
    <!--
791
                DEBUGGING SECTION
792
            -->
793
    <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">
794
        <nbstartserver debugmode="true"/>
795
        <antcall target="connect-debugger"/>
796
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
797
        <antcall target="debug-display-browser"/>
798
        <antcall target="connect-client-debugger"/>
799
    </target>
800
    <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
801
        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
802
            <classpath>
803
                <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
804
            </classpath>
805
            <sourcepath>
806
                <path path="${web.docbase.dir}"/>
807
            </sourcepath>
808
        </nbjpdaconnect>
809
    </target>
810
    <target if="do.display.browser.debug" name="debug-display-browser">
811
        <nbbrowse url="${client.url}"/>
812
    </target>
813
    <target if="do.debug.client" name="connect-client-debugger">
814
        <webproject1:nbjsdebugstart webUrl="${client.url}"/>
815
    </target>
816
    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
817
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
818
        <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
819
    </target>
820
    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
821
    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
822
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
823
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
824
    </target>
825
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
826
        <webproject1:nbjpdastart name="${debug.class}"/>
827
    </target>
828
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
829
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
830
        <webproject1:debug classname="${debug.class}"/>
831
    </target>
832
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
833
    <target depends="init" name="-pre-debug-fix">
834
        <fail unless="fix.includes">Must set fix.includes</fail>
835
        <property name="javac.includes" value="${fix.includes}.java"/>
836
    </target>
837
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
838
        <webproject1:nbjpdareload/>
839
    </target>
840
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
841
    <!--
842
                JAVADOC SECTION
843
            -->
844
    <target depends="init" if="have.sources" name="javadoc-build">
845
        <mkdir dir="${dist.javadoc.dir}"/>
846
        <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}">
847
            <classpath>
848
                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
849
            </classpath>
850
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
851
                <filename name="**/*.java"/>
852
            </fileset>
853
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
854
                <include name="**/*.java"/>
855
            </fileset>
856
        </javadoc>
857
    </target>
858
    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
859
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
860
    </target>
861
    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
862
    <!--
863

864
                JUNIT COMPILATION SECTION
865
            -->
866
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
867
        <mkdir dir="${build.test.classes.dir}"/>
868
        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
869
    </target>
870
    <target name="-pre-compile-test">
871
        <!-- Empty placeholder for easier customization. -->
872
        <!-- You can override this target in the ../build.xml file. -->
873
    </target>
874
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
875
        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
876
        <copy todir="${build.test.classes.dir}">
877
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
878
        </copy>
879
    </target>
880
    <target name="-post-compile-test">
881
        <!-- Empty placeholder for easier customization. -->
882
        <!-- You can override this target in the ../build.xml file. -->
883
    </target>
884
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
885
    <target name="-pre-compile-test-single">
886
        <!-- Empty placeholder for easier customization. -->
887
        <!-- You can override this target in the ../build.xml file. -->
888
    </target>
889
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
890
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
891
        <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}"/>
892
        <copy todir="${build.test.classes.dir}">
893
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
894
        </copy>
895
    </target>
896
    <target name="-post-compile-test-single">
897
        <!-- Empty placeholder for easier customization. -->
898
        <!-- You can override this target in the ../build.xml file. -->
899
    </target>
900
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
901
    <!--
902

903
                JUNIT EXECUTION SECTION
904
            -->
905
    <target depends="init" if="have.tests" name="-pre-test-run">
906
        <mkdir dir="${build.test.results.dir}"/>
907
    </target>
908
    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
909
        <webproject2:junit testincludes="**/*Test.java"/>
910
    </target>
911
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
912
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
913
    </target>
914
    <target depends="init" if="have.tests" name="test-report"/>
915
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
916
    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
917
    <target depends="init" if="have.tests" name="-pre-test-run-single">
918
        <mkdir dir="${build.test.results.dir}"/>
919
    </target>
920
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
921
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
922
        <webproject2:junit excludes="" includes="${test.includes}"/>
923
    </target>
924
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
925
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
926
    </target>
927
    <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"/>
928
    <!--
929

930
                JUNIT DEBUGGING SECTION
931
            -->
932
    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
933
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
934
        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
935
        <delete file="${test.report.file}"/>
936
        <!-- must exist, otherwise the XML formatter would fail -->
937
        <mkdir dir="${build.test.results.dir}"/>
938
        <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}">
939
            <customize>
940
                <arg value="showoutput=true"/>
941
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
942
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
943
            </customize>
944
        </webproject1:debug>
945
    </target>
946
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
947
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
948
    </target>
949
    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
950
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
951
        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
952
    </target>
953
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
954
    <!--
955

956
                CLEANUP SECTION
957
            -->
958
    <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
959
    <target depends="init" name="do-clean">
960
        <condition property="build.dir.to.clean" value="${build.web.dir}">
961
            <isset property="dist.ear.dir"/>
962
        </condition>
963
        <property name="build.dir.to.clean" value="${build.web.dir}"/>
964
        <delete includeEmptyDirs="true" quiet="true">
965
            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
966
        </delete>
967
        <delete dir="${build.dir}"/>
968
        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
969
        <delete dir="${dist.dir}"/>
970
    </target>
971
    <target depends="do-clean" if="status.clean-failed" name="check-clean">
972
        <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
973
        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
974
    </target>
975
    <target depends="init" if="netbeans.home" name="undeploy-clean">
976
        <nbundeploy failOnError="false" startServer="false"/>
977
    </target>
978
    <target name="-post-clean">
979
        <!-- Empty placeholder for easier customization. -->
980
        <!-- You can override this target in the ../build.xml file. -->
981
    </target>
982
    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
983
    <target depends="clean" description="Clean build products." name="clean-ear"/>
984
</project>