root/java/sql-vyuka/nbproject/build-impl.xml @ 46:da0e675db1cf

Revision 46:da0e675db1cf, 44.8 KB (checked in by fiki@…, 15 years ago)

Správné české uvozovky u „citátů“.
Přechod na Netbeans 6.7

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