1
<?xml version="1.0" encoding="UTF-8"?>
3
*** GENERATED FROM project.xml - DO NOT EDIT ***
4
*** EDIT ../build.xml INSTEAD ***
6
For the purpose of easier reading the script
7
is divided into following sections:
20
<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="build" name="JsfJpaCrud-impl">
21
<import file="ant-deploy.xml"/>
22
<target depends="dist,javadoc" description="Build whole project." name="default"/>
24
INITIALIZATION SECTION
26
<target name="-pre-init">
27
<!-- Empty placeholder for easier customization. -->
28
<!-- You can override this target in the ../build.xml file. -->
30
<target depends="-pre-init" name="-init-private">
31
<property file="nbproject/private/private.properties"/>
33
<target depends="-pre-init,-init-private" name="-init-user">
34
<property file="${user.properties.file}"/>
35
<!-- The two properties below are usually overridden -->
36
<!-- by the active platform. Just a fallback. -->
37
<property name="default.javac.source" value="1.4"/>
38
<property name="default.javac.target" value="1.4"/>
40
<target depends="-pre-init,-init-private,-init-user" name="-init-project">
41
<property file="nbproject/project.properties"/>
43
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init">
44
<property name="build.meta.inf.dir" value="${build.ear.web.dir}/META-INF"/>
45
<property name="build.classes.dir.real" value="${build.ear.classes.dir}"/>
46
<property name="build.web.dir.real" value="${build.ear.web.dir}"/>
48
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-do-ear-init" name="-do-init">
49
<condition property="have.tests">
51
<available file="${test.src.dir}"/>
54
<condition property="have.sources">
56
<available file="${src.dir}"/>
59
<condition property="netbeans.home+have.tests">
61
<isset property="netbeans.home"/>
62
<isset property="have.tests"/>
65
<condition property="no.javadoc.preview">
66
<isfalse value="${javadoc.preview}"/>
68
<property name="javac.compilerargs" value=""/>
69
<condition property="no.deps">
71
<istrue value="${no.dependencies}"/>
74
<condition property="no.dist.ear.dir">
76
<isset property="dist.ear.dir"/>
79
<property name="build.web.excludes" value="${build.classes.excludes}"/>
80
<condition property="do.compile.jsps">
81
<istrue value="${compile.jsps}"/>
83
<condition property="do.display.browser">
84
<istrue value="${display.browser}"/>
86
<available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
87
<available file="${conf.dir}/persistence.xml" property="has.persistence.xml"/>
88
<condition property="do.war.package.with.custom.manifest">
90
<istrue value="${war.package}"/>
91
<isset property="has.custom.manifest"/>
94
<condition property="do.war.package.without.custom.manifest">
96
<istrue value="${war.package}"/>
98
<isset property="has.custom.manifest"/>
102
<property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
103
<property name="build.classes.dir.real" value="${build.classes.dir}"/>
104
<property name="build.web.dir.real" value="${build.web.dir}"/>
105
<condition else="" property="application.args.param" value="${application.args}">
107
<isset property="application.args"/>
109
<equals arg1="${application.args}" arg2="" trim="true"/>
113
<property name="source.encoding" value="${file.encoding}"/>
114
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">
116
<isset property="javadoc.encoding"/>
118
<equals arg1="${javadoc.encoding}" arg2=""/>
122
<property name="javadoc.encoding.used" value="${source.encoding}"/>
123
<condition property="package.tmp.war.with.custom.manifest">
125
<isfalse value="${war.package}"/>
126
<isset property="has.custom.manifest"/>
127
<isfalse value="${directory.deployment.supported}"/>
130
<condition property="package.tmp.war.without.custom.manifest">
132
<isfalse value="${war.package}"/>
134
<isset property="has.custom.manifest"/>
136
<isfalse value="${directory.deployment.supported}"/>
140
<target name="-post-init">
141
<!-- Empty placeholder for easier customization. -->
142
<!-- You can override this target in the ../build.xml file. -->
144
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
145
<fail unless="src.dir">Must set src.dir</fail>
146
<fail unless="test.src.dir">Must set test.src.dir</fail>
147
<fail unless="build.dir">Must set build.dir</fail>
148
<fail unless="build.web.dir">Must set build.web.dir</fail>
149
<fail unless="build.generated.dir">Must set build.generated.dir</fail>
150
<fail unless="dist.dir">Must set dist.dir</fail>
151
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
152
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
153
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
154
<fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
155
<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
156
<fail unless="dist.war">Must set dist.war</fail>
158
<target name="-init-macrodef-property">
159
<macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
160
<attribute name="name"/>
161
<attribute name="value"/>
163
<property name="@{name}" value="${@{value}}"/>
167
<target name="-init-macrodef-javac">
168
<macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
169
<attribute default="${src.dir}" name="srcdir"/>
170
<attribute default="${build.classes.dir.real}" name="destdir"/>
171
<attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
172
<attribute default="${javac.debug}" name="debug"/>
173
<attribute default="" name="javac.compilerargs.jaxws"/>
174
<element name="customize" optional="true"/>
176
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" includeantruntime="false" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
178
<path path="@{classpath}"/>
180
<compilerarg line="${javac.compilerargs} @{javac.compilerargs.jaxws}"/>
186
<target name="-init-macrodef-junit">
187
<macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
188
<attribute default="**/*Test.java" name="includes"/>
190
<junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
191
<batchtest todir="${build.test.results.dir}">
192
<fileset dir="${test.src.dir}" includes="@{includes}"/>
195
<path path="${run.test.classpath}"/>
198
<propertyref prefix="test-sys-prop."/>
199
<mapper from="test-sys-prop.*" to="*" type="glob"/>
201
<formatter type="brief" usefile="false"/>
202
<formatter type="xml"/>
207
<target name="-init-macrodef-java">
208
<macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
209
<attribute default="${main.class}" name="classname"/>
210
<element name="customize" optional="true"/>
212
<java classname="@{classname}" fork="true">
213
<jvmarg line="${runmain.jvmargs}"/>
215
<path path="${build.classes.dir.real}:${javac.classpath}:${j2ee.platform.classpath}"/>
218
<propertyref prefix="run-sys-prop."/>
219
<mapper from="run-sys-prop.*" to="*" type="glob"/>
226
<target name="-init-macrodef-nbjpda">
227
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
228
<attribute default="${main.class}" name="name"/>
229
<attribute default="${debug.classpath}" name="classpath"/>
231
<nbjpdastart addressproperty="jpda.address" name="@{name}" transport="dt_socket">
233
<path path="@{classpath}"/>
238
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
239
<attribute default="${build.classes.dir.real}" name="dir"/>
242
<fileset dir="@{dir}" includes="${fix.includes}*.class"/>
247
<target name="-init-debug-args">
248
<property name="version-output" value="java version "${ant.java.version}"/>
249
<condition property="have-jdk-older-than-1.4">
251
<contains string="${version-output}" substring="java version "1.0"/>
252
<contains string="${version-output}" substring="java version "1.1"/>
253
<contains string="${version-output}" substring="java version "1.2"/>
254
<contains string="${version-output}" substring="java version "1.3"/>
257
<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
258
<istrue value="${have-jdk-older-than-1.4}"/>
261
<target depends="-init-debug-args" name="-init-macrodef-debug">
262
<macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
263
<attribute default="${main.class}" name="classname"/>
264
<attribute default="${debug.classpath}" name="classpath"/>
265
<attribute default="${application.args.param}" name="args"/>
267
<java classname="@{classname}" fork="true">
268
<jvmarg line="${debug-args-line}"/>
269
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
270
<jvmarg line="${runmain.jvmargs}"/>
272
<path path="@{classpath}"/>
275
<propertyref prefix="run-sys-prop."/>
276
<mapper from="run-sys-prop.*" to="*" type="glob"/>
278
<arg line="@{args}"/>
283
<target name="-init-macrodef-copy-ear-war">
284
<macrodef name="copy-ear-war">
285
<attribute name="file"/>
286
<attribute name="propname"/>
288
<basename file="@{file}" property="base_@{propname}"/>
289
<zipfileset id="tld.files_@{propname}" includes="META-INF/*.tld META-INF/tlds/*.tld" src="@{file}"/>
290
<pathconvert property="tld.files.path_@{propname}" refid="tld.files_@{propname}"/>
291
<condition property="hastlds_@{propname}" value="yes">
292
<contains casesensitive="false" string="${tld.files.path_@{propname}}" substring=".tld"/>
294
<condition property="copy.to.dir_@{propname}" value="${build.web.dir.real}/WEB-INF/lib">
295
<isset property="hastlds_@{propname}"/>
297
<condition property="copy.to.dir_@{propname}" value="${dist.ear.dir}">
299
<isset property="hastlds_@{propname}"/>
302
<copy file="@{file}" todir="${copy.to.dir_@{propname}}"/>
303
<condition property="@{propname}" value="${base_@{propname}}">
305
<isset property="hastlds_@{propname}"/>
308
<condition property="@{propname}" value="">
309
<isset property="hastlds_@{propname}"/>
314
<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-debug,-init-macrodef-copy-ear-war" name="init"/>
318
<target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
319
<target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
320
<target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
321
<target depends="init,deps-jar" name="-pre-pre-compile">
322
<mkdir dir="${build.classes.dir.real}"/>
324
<target name="-pre-compile">
325
<!-- Empty placeholder for easier customization. -->
326
<!-- You can override this target in the ../build.xml file. -->
328
<target name="-copy-webdir">
329
<copy todir="${build.web.dir.real}">
330
<fileset dir="${web.docbase.dir}" excludes="${build.web.excludes}"/>
332
<copy todir="${build.web.dir.real}/WEB-INF">
333
<fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
336
<target if="rest.support.on" name="-init-rest">
337
<condition property="platform.restlib.classpath" value="${j2ee.platform.classpath}">
339
<isset property="restlib.ignore.platform"/>
340
<isfalse value="${restlib.ignore.platform}"/>
343
<taskdef classname="com.sun.ws.rest.tools.ant.WebResourcesProcessorTask" name="restapt">
345
<path path="${platform.restlib.classpath}"/>
346
<path path="${libs.restlib.classpath}"/>
350
<target depends="-init-rest" if="rest.support.on" name="-rest-post-compile">
351
<mkdir dir="${build.generated.dir}/rest-gen"/>
352
<restapt destdir="${build.generated.dir}/rest-gen" fork="true" nocompile="true" sourcePath="${src.dir}" sourcedestdir="${build.generated.dir}/rest-gen" xEndorsed="true">
354
<path path="${javac.classpath}"/>
355
<path path="${libs.jaxws21.classpath}"/>
356
<path path="${j2ee.platform.classpath}"/>
357
<pathelement location="${build.web.dir}/WEB-INF/classes"/>
359
<source dir="${src.dir}">
360
<include name="**/*.java"/>
363
<webproject2:javac destdir="${build.classes.dir.real}" srcdir="${build.generated.dir}/rest-gen"/>
364
<copy todir="${build.classes.dir.real}">
365
<fileset dir="${build.generated.dir}/rest-gen" includes="**/*.wadl"/>
368
<target name="-do-ws-compile"/>
369
<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,-do-ws-compile" if="have.sources" name="-do-compile">
370
<webproject2:javac destdir="${build.classes.dir.real}"/>
371
<copy todir="${build.classes.dir.real}">
372
<fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
375
<target if="has.custom.manifest" name="-copy-manifest">
376
<mkdir dir="${build.meta.inf.dir}"/>
377
<copy todir="${build.meta.inf.dir}">
378
<fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
381
<target if="has.persistence.xml" name="-copy-persistence-xml">
382
<mkdir dir="${build.web.dir.real}/WEB-INF/classes/META-INF"/>
383
<copy todir="${build.web.dir.real}/WEB-INF/classes/META-INF">
384
<fileset dir="${conf.dir}" includes="persistence.xml"/>
387
<target name="-post-compile">
388
<!-- Empty placeholder for easier customization. -->
389
<!-- You can override this target in the ../build.xml file. -->
391
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-rest-post-compile,-post-compile" description="Compile project." name="compile"/>
392
<target name="-pre-compile-single">
393
<!-- Empty placeholder for easier customization. -->
394
<!-- You can override this target in the ../build.xml file. -->
396
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
397
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
400
<patternset includes="${javac.includes}"/>
403
<copy todir="${build.classes.dir.real}">
404
<fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
407
<target name="-post-compile-single">
408
<!-- Empty placeholder for easier customization. -->
409
<!-- You can override this target in the ../build.xml file. -->
411
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
412
<target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
413
<mkdir dir="${build.generated.dir}/src"/>
414
<java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
415
<arg value="-uriroot"/>
416
<arg file="${basedir}/${build.web.dir.real}"/>
418
<arg file="${basedir}/${build.generated.dir}/src"/>
420
<classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/>
422
<mkdir dir="${build.generated.dir}/classes"/>
423
<webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir.real}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
425
<target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
426
<fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
427
<mkdir dir="${build.generated.dir}/src"/>
428
<java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
429
<arg value="-uriroot"/>
430
<arg file="${basedir}/${build.web.dir.real}"/>
432
<arg file="${basedir}/${build.generated.dir}/src"/>
434
<arg value="-jspc.files"/>
435
<arg path="${jsp.includes}"/>
436
<classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/>
438
<mkdir dir="${build.generated.dir}/classes"/>
439
<webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir.real}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
441
<patternset includes="${javac.jsp.includes}"/>
445
<target name="compile-single-jsp">
446
<fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
447
<antcall target="-do-compile-single-jsp"/>
450
DIST BUILDING SECTION
452
<target name="-pre-dist">
453
<!-- Empty placeholder for easier customization. -->
454
<!-- You can override this target in the ../build.xml file. -->
456
<target depends="init,compile,compile-jsps" name="-dist-without-custom-manifest" unless="has.custom.manifest">
457
<dirname file="${dist.war}" property="dist.jar.dir"/>
458
<mkdir dir="${dist.jar.dir}"/>
459
<jar compress="${jar.compress}" jarfile="${dist.war}">
460
<fileset dir="${build.web.dir.real}"/>
463
<target depends="init,compile,compile-jsps" if="has.custom.manifest" name="-dist-with-custom-manifest">
464
<dirname file="${dist.war}" property="dist.jar.dir"/>
465
<mkdir dir="${dist.jar.dir}"/>
466
<jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
467
<fileset dir="${build.web.dir.real}"/>
470
<target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
471
<antcall target="-dist-without-custom-manifest"/>
473
<target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
474
<antcall target="-dist-with-custom-manifest"/>
476
<target depends="init,compile,compile-jsps" if="package.tmp.war.with.custom.manifest" name="-package-tmp-war-with-manifest">
477
<antcall target="-dist-with-custom-manifest"/>
479
<target depends="init,compile,compile-jsps" if="package.tmp.war.without.custom.manifest" name="-package-tmp-war-without-manifest">
480
<antcall target="-dist-without-custom-manifest"/>
482
<target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
483
<target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
484
<mkdir dir="${build.web.dir.real}/META-INF"/>
485
<manifest file="${build.web.dir.real}/META-INF/MANIFEST.MF" mode="update"/>
486
<delete dir="${dist.ear.dir}/temp"/>
488
<target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"/>
489
<target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" name="do-ear-dist">
490
<dirname file="${dist.ear.war}" property="dist.jar.dir"/>
491
<mkdir dir="${dist.jar.dir}"/>
492
<jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir.real}/META-INF/MANIFEST.MF">
493
<fileset dir="${build.web.dir.real}"/>
496
<target name="-post-dist">
497
<!-- Empty placeholder for easier customization. -->
498
<!-- You can override this target in the ../build.xml file. -->
500
<target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
501
<target depends="init,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
505
<target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
506
<target name="-pre-run-deploy">
507
<!-- Empty placeholder for easier customization. -->
508
<!-- You can override this target in the ../build.xml file. -->
510
<target name="-post-run-deploy">
511
<!-- Empty placeholder for easier customization. -->
512
<!-- You can override this target in the ../build.xml file. -->
514
<target name="-pre-nbmodule-run-deploy">
515
<!-- Empty placeholder for easier customization. -->
516
<!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
518
<target name="-post-nbmodule-run-deploy">
519
<!-- Empty placeholder for easier customization. -->
520
<!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
522
<target name="-run-deploy-am">
523
<!-- Task to deploy to the Access Manager runtime. -->
525
<target depends="init,compile,compile-jsps,-do-compile-single-jsp,dist,-package-tmp-war-without-manifest,-package-tmp-war-with-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"/>
526
<target if="netbeans.home" name="-run-deploy-nb">
527
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
529
<target name="-init-deploy-ant" unless="netbeans.home">
530
<property name="deploy.ant.archive" value="${dist.war}"/>
531
<property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
532
<property name="deploy.ant.resource.dir" value="${resource.dir}"/>
533
<property name="deploy.ant.enabled" value="true"/>
535
<target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
536
<target if="netbeans.home" name="-run-undeploy-nb">
537
<fail message="Undeploy is not supported from within the IDE"/>
539
<target depends="init,-pre-dist,-dist-without-custom-manifest,-dist-with-custom-manifest,-post-dist" name="verify">
540
<nbverify file="${dist.war}"/>
542
<target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
543
<target if="do.display.browser" name="-init-display-browser">
544
<condition property="do.display.browser.nb">
545
<isset property="netbeans.home"/>
547
<condition property="do.display.browser.cl">
548
<isset property="deploy.ant.enabled"/>
551
<target if="do.display.browser.nb" name="-display-browser-nb">
552
<nbbrowse url="${client.url}"/>
554
<target if="do.display.browser.cl" name="-get-browser" unless="browser">
555
<condition property="browser" value="rundll32">
556
<os family="windows"/>
558
<condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
559
<os family="windows"/>
561
<condition property="browser" value="/usr/bin/open">
564
<property environment="env"/>
565
<condition property="browser" value="${env.BROWSER}">
566
<isset property="env.BROWSER"/>
568
<condition property="browser" value="/usr/bin/firefox">
569
<available file="/usr/bin/firefox"/>
571
<condition property="browser" value="/usr/local/firefox/firefox">
572
<available file="/usr/local/firefox/firefox"/>
574
<condition property="browser" value="/usr/bin/mozilla">
575
<available file="/usr/bin/mozilla"/>
577
<condition property="browser" value="/usr/local/mozilla/mozilla">
578
<available file="/usr/local/mozilla/mozilla"/>
580
<condition property="browser" value="/usr/sfw/lib/firefox/firefox">
581
<available file="/usr/sfw/lib/firefox/firefox"/>
583
<condition property="browser" value="/opt/csw/bin/firefox">
584
<available file="/opt/csw/bin/firefox"/>
586
<condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
587
<available file="/usr/sfw/lib/mozilla/mozilla"/>
589
<condition property="browser" value="/opt/csw/bin/mozilla">
590
<available file="/opt/csw/bin/mozilla"/>
593
<target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
594
<fail unless="browser">
595
Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
597
<property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
598
<echo>Launching ${browse.url}</echo>
599
<exec executable="${browser}" spawn="true">
600
<arg line="${browser.args} ${browse.url}"/>
603
<target depends="init,compile-single" name="run-main">
604
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
605
<webproject1:java classname="${run.class}"/>
607
<target depends="run-deploy,-init-display-browser" name="test-restbeans">
608
<replace file="${restbeans.test.file}" token="${base.url.token}" value="${client.url}"/>
609
<nbbrowse url="${restbeans.test.url}"/>
614
<target depends="init,compile,compile-jsps,-do-compile-single-jsp,dist,-package-tmp-war-without-manifest,-package-tmp-war-with-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
615
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="true"/>
616
<antcall target="connect-debugger"/>
617
<antcall target="debug-display-browser"/>
619
<target name="connect-debugger" unless="is.debugged">
620
<nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
622
<path path="${debug.classpath}:${ws.debug.classpaths}"/>
625
<path path="${web.docbase.dir}:${ws.web.docbase.dirs}"/>
629
<target if="do.display.browser" name="debug-display-browser">
630
<nbbrowse url="${client.url}"/>
632
<target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
633
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
634
<webproject1:nbjpdastart name="${debug.class}"/>
636
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
637
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
638
<webproject1:debug classname="${debug.class}"/>
640
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
641
<target depends="init" name="-pre-debug-fix">
642
<fail unless="fix.includes">Must set fix.includes</fail>
643
<property name="javac.includes" value="${fix.includes}.java"/>
645
<target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
646
<webproject1:nbjpdareload/>
648
<target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
652
<target depends="init" name="javadoc-build">
653
<mkdir dir="${dist.javadoc.dir}"/>
654
<javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" destdir="${dist.javadoc.dir}" 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}">
656
<path path="${javac.classpath}:${j2ee.platform.classpath}"/>
659
<pathelement location="${src.dir}"/>
661
<packageset dir="${src.dir}" includes="*/**"/>
662
<fileset dir="${src.dir}" includes="*.java"/>
665
<target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
666
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
668
<target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
671
JUNIT COMPILATION SECTION
673
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
674
<mkdir dir="${build.test.classes.dir}"/>
676
<target name="-pre-compile-test">
677
<!-- Empty placeholder for easier customization. -->
678
<!-- You can override this target in the ../build.xml file. -->
680
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
681
<webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
682
<copy todir="${build.test.classes.dir}">
683
<fileset dir="${test.src.dir}" excludes="**/*.java"/>
686
<target name="-post-compile-test">
687
<!-- Empty placeholder for easier customization. -->
688
<!-- You can override this target in the ../build.xml file. -->
690
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
691
<target name="-pre-compile-test-single">
692
<!-- Empty placeholder for easier customization. -->
693
<!-- You can override this target in the ../build.xml file. -->
695
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
696
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
697
<webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}">
699
<patternset includes="${javac.includes}"/>
702
<copy todir="${build.test.classes.dir}">
703
<fileset dir="${test.src.dir}" excludes="**/*.java"/>
706
<target name="-post-compile-test-single">
707
<!-- Empty placeholder for easier customization. -->
708
<!-- You can override this target in the ../build.xml file. -->
710
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
713
JUNIT EXECUTION SECTION
715
<target depends="init" if="have.tests" name="-pre-test-run">
716
<mkdir dir="${build.test.results.dir}"/>
718
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
721
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
722
<fail if="tests.failed">Some tests failed; see details above.</fail>
724
<target depends="init" if="have.tests" name="test-report"/>
725
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
726
<target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
727
<target depends="init" if="have.tests" name="-pre-test-run-single">
728
<mkdir dir="${build.test.results.dir}"/>
730
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
731
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
732
<webproject2:junit includes="${test.includes}"/>
734
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
735
<fail if="tests.failed">Some tests failed; see details above.</fail>
737
<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"/>
740
JUNIT DEBUGGING SECTION
742
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
743
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
744
<webproject1:debug args="${test.class}" classname="junit.textui.TestRunner" classpath="${debug.test.classpath}"/>
746
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
747
<webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
749
<target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
750
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
751
<webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
753
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
758
<target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
759
<target depends="init" name="do-clean">
760
<condition property="build.dir.to.clean" value="${build.web.dir.real}">
761
<isset property="dist.ear.dir"/>
763
<property name="build.dir.to.clean" value="${build.web.dir.real}"/>
764
<delete includeEmptyDirs="true" quiet="true">
765
<fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
767
<delete dir="${build.dir}"/>
768
<available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
769
<delete dir="${dist.dir}"/>
771
<target depends="do-clean" if="status.clean-failed" name="check-clean">
772
<echo message="Warning: unable to delete some files in ${build.web.dir.real}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
773
<echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
775
<target name="-post-clean">
776
<!-- Empty placeholder for easier customization. -->
777
<!-- You can override this target in the ../build.xml file. -->
779
<target depends="init,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
780
<target depends="clean" description="Clean build products." name="clean-ear"/>