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