java/nekurak.net-web/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Fri Nov 18 21:34:47 2011 +0100 (2011-11-18)
changeset 198 3464334db89a
parent 186 b0f7d9ab4a07
permissions -rw-r--r--
Kontrola diakritiky v komentářích (+ varování, když chybí) a pár kulatých rohů (CSS).
franta-hg@0
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@0
     2
<!--
franta-hg@0
     3
        *** GENERATED FROM project.xml - DO NOT EDIT  ***
franta-hg@0
     4
        ***         EDIT ../build.xml INSTEAD         ***
franta-hg@0
     5
franta-hg@0
     6
        For the purpose of easier reading the script
franta-hg@0
     7
        is divided into following sections:
franta-hg@0
     8
        - initialization
franta-hg@0
     9
        - compilation
franta-hg@0
    10
        - dist
franta-hg@0
    11
        - execution
franta-hg@0
    12
        - debugging
franta-hg@0
    13
        - javadoc
franta-hg@0
    14
        - junit compilation
franta-hg@0
    15
        - junit execution
franta-hg@0
    16
        - junit debugging
franta-hg@0
    17
        - cleanup
franta-hg@0
    18
franta-hg@0
    19
        -->
franta-hg@0
    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="nekurak.net-web-impl">
franta-hg@75
    21
    <import file="rest-build.xml"/>
franta-hg@0
    22
    <import file="ant-deploy.xml"/>
franta-hg@0
    23
    <fail message="Please build using Ant 1.7.1 or higher.">
franta-hg@0
    24
        <condition>
franta-hg@0
    25
            <not>
franta-hg@0
    26
                <antversion atleast="1.7.1"/>
franta-hg@0
    27
            </not>
franta-hg@0
    28
        </condition>
franta-hg@0
    29
    </fail>
franta-hg@0
    30
    <target depends="dist,javadoc" description="Build whole project." name="default"/>
franta-hg@0
    31
    <!--
franta-hg@0
    32
                INITIALIZATION SECTION
franta-hg@0
    33
            -->
franta-hg@0
    34
    <target name="-pre-init">
franta-hg@0
    35
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
    36
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
    37
    </target>
franta-hg@0
    38
    <target depends="-pre-init" name="-init-private">
franta-hg@0
    39
        <property file="nbproject/private/private.properties"/>
franta-hg@0
    40
    </target>
franta-hg@0
    41
    <target depends="-pre-init,-init-private" name="-init-user">
franta-hg@0
    42
        <property file="${user.properties.file}"/>
franta-hg@0
    43
        <!-- The two properties below are usually overridden -->
franta-hg@0
    44
        <!-- by the active platform. Just a fallback. -->
franta-hg@0
    45
        <property name="default.javac.source" value="1.4"/>
franta-hg@0
    46
        <property name="default.javac.target" value="1.4"/>
franta-hg@0
    47
    </target>
franta-hg@0
    48
    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
franta-hg@0
    49
        <property file="nbproject/project.properties"/>
franta-hg@0
    50
    </target>
franta-hg@0
    51
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
franta-hg@0
    52
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
franta-hg@0
    53
        <condition property="have.tests">
franta-hg@0
    54
            <or>
franta-hg@0
    55
                <available file="${test.src.dir}"/>
franta-hg@0
    56
            </or>
franta-hg@0
    57
        </condition>
franta-hg@0
    58
        <condition property="have.sources">
franta-hg@0
    59
            <or>
franta-hg@0
    60
                <available file="${src.dir}"/>
franta-hg@0
    61
            </or>
franta-hg@0
    62
        </condition>
franta-hg@0
    63
        <condition property="netbeans.home+have.tests">
franta-hg@0
    64
            <and>
franta-hg@0
    65
                <isset property="netbeans.home"/>
franta-hg@0
    66
                <isset property="have.tests"/>
franta-hg@0
    67
            </and>
franta-hg@0
    68
        </condition>
franta-hg@0
    69
        <condition property="no.javadoc.preview">
franta-hg@0
    70
            <isfalse value="${javadoc.preview}"/>
franta-hg@0
    71
        </condition>
franta-hg@0
    72
        <property name="javac.compilerargs" value=""/>
franta-hg@0
    73
        <condition property="no.deps">
franta-hg@0
    74
            <and>
franta-hg@0
    75
                <istrue value="${no.dependencies}"/>
franta-hg@0
    76
            </and>
franta-hg@0
    77
        </condition>
franta-hg@0
    78
        <condition property="no.dist.ear.dir">
franta-hg@0
    79
            <not>
franta-hg@0
    80
                <isset property="dist.ear.dir"/>
franta-hg@0
    81
            </not>
franta-hg@0
    82
        </condition>
franta-hg@0
    83
        <property name="build.web.excludes" value="${build.classes.excludes}"/>
franta-hg@0
    84
        <condition property="do.compile.jsps">
franta-hg@0
    85
            <istrue value="${compile.jsps}"/>
franta-hg@0
    86
        </condition>
franta-hg@0
    87
        <condition property="do.debug.server">
franta-hg@0
    88
            <or>
franta-hg@0
    89
                <not>
franta-hg@0
    90
                    <isset property="debug.server"/>
franta-hg@0
    91
                </not>
franta-hg@0
    92
                <istrue value="${debug.server}"/>
franta-hg@0
    93
                <and>
franta-hg@0
    94
                    <not>
franta-hg@0
    95
                        <istrue value="${debug.server}"/>
franta-hg@0
    96
                    </not>
franta-hg@0
    97
                    <not>
franta-hg@0
    98
                        <istrue value="${debug.client}"/>
franta-hg@0
    99
                    </not>
franta-hg@0
   100
                </and>
franta-hg@0
   101
            </or>
franta-hg@0
   102
        </condition>
franta-hg@0
   103
        <condition property="do.debug.client">
franta-hg@0
   104
            <istrue value="${debug.client}"/>
franta-hg@0
   105
        </condition>
franta-hg@0
   106
        <condition property="do.display.browser">
franta-hg@0
   107
            <istrue value="${display.browser}"/>
franta-hg@0
   108
        </condition>
franta-hg@0
   109
        <condition property="do.display.browser.debug">
franta-hg@0
   110
            <and>
franta-hg@0
   111
                <isset property="do.display.browser"/>
franta-hg@0
   112
                <not>
franta-hg@0
   113
                    <isset property="do.debug.client"/>
franta-hg@0
   114
                </not>
franta-hg@0
   115
            </and>
franta-hg@0
   116
        </condition>
franta-hg@0
   117
        <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
franta-hg@0
   118
        <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
franta-hg@0
   119
        <condition property="do.war.package.with.custom.manifest">
franta-hg@0
   120
            <isset property="has.custom.manifest"/>
franta-hg@0
   121
        </condition>
franta-hg@0
   122
        <condition property="do.war.package.without.custom.manifest">
franta-hg@0
   123
            <not>
franta-hg@0
   124
                <isset property="has.custom.manifest"/>
franta-hg@0
   125
            </not>
franta-hg@0
   126
        </condition>
franta-hg@0
   127
        <condition property="do.tmp.war.package.with.custom.manifest">
franta-hg@0
   128
            <and>
franta-hg@0
   129
                <isset property="has.custom.manifest"/>
franta-hg@6
   130
                <or>
franta-hg@6
   131
                    <isfalse value="${directory.deployment.supported}"/>
franta-hg@6
   132
                    <isset property="dist.ear.dir"/>
franta-hg@6
   133
                </or>
franta-hg@0
   134
            </and>
franta-hg@0
   135
        </condition>
franta-hg@0
   136
        <condition property="do.tmp.war.package.without.custom.manifest">
franta-hg@0
   137
            <and>
franta-hg@0
   138
                <not>
franta-hg@0
   139
                    <isset property="has.custom.manifest"/>
franta-hg@0
   140
                </not>
franta-hg@6
   141
                <or>
franta-hg@6
   142
                    <isfalse value="${directory.deployment.supported}"/>
franta-hg@6
   143
                    <isset property="dist.ear.dir"/>
franta-hg@6
   144
                </or>
franta-hg@0
   145
            </and>
franta-hg@0
   146
        </condition>
franta-hg@0
   147
        <condition property="do.tmp.war.package">
franta-hg@6
   148
            <or>
franta-hg@6
   149
                <isfalse value="${directory.deployment.supported}"/>
franta-hg@6
   150
                <isset property="dist.ear.dir"/>
franta-hg@6
   151
            </or>
franta-hg@0
   152
        </condition>
franta-hg@0
   153
        <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
franta-hg@0
   154
        <condition else="" property="application.args.param" value="${application.args}">
franta-hg@0
   155
            <and>
franta-hg@0
   156
                <isset property="application.args"/>
franta-hg@0
   157
                <not>
franta-hg@0
   158
                    <equals arg1="${application.args}" arg2="" trim="true"/>
franta-hg@0
   159
                </not>
franta-hg@0
   160
            </and>
franta-hg@0
   161
        </condition>
franta-hg@0
   162
        <property name="source.encoding" value="${file.encoding}"/>
franta-hg@0
   163
        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
franta-hg@0
   164
            <and>
franta-hg@0
   165
                <isset property="javadoc.encoding"/>
franta-hg@0
   166
                <not>
franta-hg@0
   167
                    <equals arg1="${javadoc.encoding}" arg2=""/>
franta-hg@0
   168
                </not>
franta-hg@0
   169
            </and>
franta-hg@0
   170
        </condition>
franta-hg@0
   171
        <property name="javadoc.encoding.used" value="${source.encoding}"/>
franta-hg@0
   172
        <property name="includes" value="**"/>
franta-hg@0
   173
        <property name="excludes" value=""/>
franta-hg@6
   174
        <property name="runmain.jvmargs" value=""/>
franta-hg@6
   175
        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
franta-hg@6
   176
        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
franta-hg@186
   177
            <and>
franta-hg@186
   178
                <isset property="endorsed.classpath"/>
franta-hg@186
   179
                <length length="0" string="${endorsed.classpath}" when="greater"/>
franta-hg@186
   180
            </and>
franta-hg@0
   181
        </condition>
franta-hg@186
   182
        <condition else="false" property="jdkBug6558476">
franta-hg@186
   183
            <and>
franta-hg@186
   184
                <matches pattern="1\.[56]" string="${java.specification.version}"/>
franta-hg@186
   185
                <not>
franta-hg@186
   186
                    <os family="unix"/>
franta-hg@186
   187
                </not>
franta-hg@186
   188
            </and>
franta-hg@186
   189
        </condition>
franta-hg@186
   190
        <property name="javac.fork" value="${jdkBug6558476}"/>
franta-hg@0
   191
    </target>
franta-hg@0
   192
    <target depends="init" name="-init-cos" unless="deploy.on.save">
franta-hg@0
   193
        <condition property="deploy.on.save" value="true">
franta-hg@197
   194
            <or>
franta-hg@197
   195
                <istrue value="${j2ee.deploy.on.save}"/>
franta-hg@197
   196
                <istrue value="${j2ee.compile.on.save}"/>
franta-hg@197
   197
            </or>
franta-hg@0
   198
        </condition>
franta-hg@0
   199
    </target>
franta-hg@0
   200
    <target name="-post-init">
franta-hg@0
   201
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   202
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   203
    </target>
franta-hg@0
   204
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
franta-hg@0
   205
        <fail unless="src.dir">Must set src.dir</fail>
franta-hg@0
   206
        <fail unless="test.src.dir">Must set test.src.dir</fail>
franta-hg@0
   207
        <fail unless="build.dir">Must set build.dir</fail>
franta-hg@0
   208
        <fail unless="build.web.dir">Must set build.web.dir</fail>
franta-hg@0
   209
        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
franta-hg@0
   210
        <fail unless="dist.dir">Must set dist.dir</fail>
franta-hg@0
   211
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
franta-hg@0
   212
        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
franta-hg@0
   213
        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
franta-hg@0
   214
        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
franta-hg@0
   215
        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
franta-hg@0
   216
        <fail unless="dist.war">Must set dist.war</fail>
franta-hg@142
   217
        <condition property="missing.j2ee.server.home">
franta-hg@142
   218
            <and>
franta-hg@142
   219
                <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>
franta-hg@142
   220
                <not>
franta-hg@142
   221
                    <isset property="j2ee.server.home"/>
franta-hg@142
   222
                </not>
franta-hg@142
   223
            </and>
franta-hg@142
   224
        </condition>
franta-hg@142
   225
        <fail if="missing.j2ee.server.home">
franta-hg@142
   226
The Java EE server classpath is not correctly set up - server home directory is missing.
franta-hg@142
   227
Either open the project in the IDE and assign the server or setup the server classpath manually.
franta-hg@142
   228
For example like this:
franta-hg@142
   229
   ant -Dj2ee.server.home=&lt;app_server_installation_directory&gt;
franta-hg@142
   230
                </fail>
franta-hg@0
   231
        <fail unless="j2ee.platform.classpath">
franta-hg@0
   232
The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
franta-hg@0
   233
Either open the project in the IDE and assign the server or setup the server classpath manually.
franta-hg@0
   234
For example like this:
franta-hg@0
   235
   ant -Duser.properties.file=&lt;path_to_property_file&gt; (where you put the property "j2ee.platform.classpath" in a .properties file)
franta-hg@0
   236
or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties file is used)
franta-hg@0
   237
                </fail>
franta-hg@0
   238
    </target>
franta-hg@0
   239
    <target name="-init-macrodef-property">
franta-hg@0
   240
        <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@0
   241
            <attribute name="name"/>
franta-hg@0
   242
            <attribute name="value"/>
franta-hg@0
   243
            <sequential>
franta-hg@0
   244
                <property name="@{name}" value="${@{value}}"/>
franta-hg@0
   245
            </sequential>
franta-hg@0
   246
        </macrodef>
franta-hg@0
   247
    </target>
franta-hg@142
   248
    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
franta-hg@0
   249
        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@0
   250
            <attribute default="${src.dir}" name="srcdir"/>
franta-hg@0
   251
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@0
   252
            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@142
   253
            <attribute default="${javac.processorpath}" name="processorpath"/>
franta-hg@142
   254
            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
franta-hg@142
   255
            <attribute default="${includes}" name="includes"/>
franta-hg@142
   256
            <attribute default="${excludes}" name="excludes"/>
franta-hg@142
   257
            <attribute default="${javac.debug}" name="debug"/>
franta-hg@142
   258
            <attribute default="${empty.dir}" name="gensrcdir"/>
franta-hg@142
   259
            <element name="customize" optional="true"/>
franta-hg@142
   260
            <sequential>
franta-hg@142
   261
                <property location="${build.dir}/empty" name="empty.dir"/>
franta-hg@142
   262
                <mkdir dir="${empty.dir}"/>
franta-hg@142
   263
                <mkdir dir="@{apgeneratedsrcdir}"/>
franta-hg@186
   264
                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
franta-hg@142
   265
                    <src>
franta-hg@142
   266
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
franta-hg@142
   267
                            <include name="*"/>
franta-hg@142
   268
                        </dirset>
franta-hg@142
   269
                    </src>
franta-hg@142
   270
                    <classpath>
franta-hg@142
   271
                        <path path="@{classpath}"/>
franta-hg@142
   272
                    </classpath>
franta-hg@142
   273
                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@142
   274
                    <compilerarg line="${javac.compilerargs}"/>
franta-hg@142
   275
                    <compilerarg value="-processorpath"/>
franta-hg@142
   276
                    <compilerarg path="@{processorpath}:${empty.dir}"/>
franta-hg@142
   277
                    <compilerarg line="${ap.processors.internal}"/>
franta-hg@142
   278
                    <compilerarg value="-s"/>
franta-hg@142
   279
                    <compilerarg path="@{apgeneratedsrcdir}"/>
franta-hg@142
   280
                    <compilerarg line="${ap.proc.none.internal}"/>
franta-hg@142
   281
                    <customize/>
franta-hg@142
   282
                </javac>
franta-hg@142
   283
            </sequential>
franta-hg@142
   284
        </macrodef>
franta-hg@142
   285
    </target>
franta-hg@142
   286
    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
franta-hg@142
   287
        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@142
   288
            <attribute default="${src.dir}" name="srcdir"/>
franta-hg@142
   289
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@142
   290
            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@142
   291
            <attribute default="${javac.processorpath}" name="processorpath"/>
franta-hg@142
   292
            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
franta-hg@0
   293
            <attribute default="${includes}" name="includes"/>
franta-hg@0
   294
            <attribute default="${excludes}" name="excludes"/>
franta-hg@0
   295
            <attribute default="${javac.debug}" name="debug"/>
franta-hg@0
   296
            <attribute default="${empty.dir}" name="gensrcdir"/>
franta-hg@0
   297
            <element name="customize" optional="true"/>
franta-hg@0
   298
            <sequential>
franta-hg@0
   299
                <property location="${build.dir}/empty" name="empty.dir"/>
franta-hg@0
   300
                <mkdir dir="${empty.dir}"/>
franta-hg@0
   301
                <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@0
   302
                    <src>
franta-hg@0
   303
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
franta-hg@0
   304
                            <include name="*"/>
franta-hg@0
   305
                        </dirset>
franta-hg@0
   306
                    </src>
franta-hg@0
   307
                    <classpath>
franta-hg@0
   308
                        <path path="@{classpath}"/>
franta-hg@0
   309
                    </classpath>
franta-hg@6
   310
                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@6
   311
                    <compilerarg line="${javac.compilerargs}"/>
franta-hg@0
   312
                    <customize/>
franta-hg@0
   313
                </javac>
franta-hg@0
   314
            </sequential>
franta-hg@0
   315
        </macrodef>
franta-hg@0
   316
    </target>
franta-hg@142
   317
    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
franta-hg@142
   318
        <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@142
   319
            <attribute default="${src.dir}" name="srcdir"/>
franta-hg@142
   320
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@142
   321
            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@142
   322
            <sequential>
franta-hg@142
   323
                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
franta-hg@142
   324
                    <classpath>
franta-hg@142
   325
                        <path path="@{classpath}"/>
franta-hg@142
   326
                    </classpath>
franta-hg@142
   327
                </depend>
franta-hg@142
   328
            </sequential>
franta-hg@142
   329
        </macrodef>
franta-hg@142
   330
        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@142
   331
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@142
   332
            <sequential>
franta-hg@142
   333
                <fail unless="javac.includes">Must set javac.includes</fail>
franta-hg@186
   334
                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
franta-hg@142
   335
                    <path>
franta-hg@142
   336
                        <filelist dir="@{destdir}" files="${javac.includes}"/>
franta-hg@142
   337
                    </path>
franta-hg@142
   338
                    <globmapper from="*.java" to="*.class"/>
franta-hg@142
   339
                </pathconvert>
franta-hg@186
   340
                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
franta-hg@186
   341
                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
franta-hg@142
   342
                <delete>
franta-hg@186
   343
                    <files includesfile="${javac.includesfile.binary}"/>
franta-hg@142
   344
                </delete>
franta-hg@186
   345
                <delete file="${javac.includesfile.binary}"/>
franta-hg@142
   346
            </sequential>
franta-hg@142
   347
        </macrodef>
franta-hg@142
   348
    </target>
franta-hg@0
   349
    <target name="-init-macrodef-junit">
franta-hg@0
   350
        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@0
   351
            <attribute default="${includes}" name="includes"/>
franta-hg@0
   352
            <attribute default="${excludes}" name="excludes"/>
franta-hg@0
   353
            <attribute default="**" name="testincludes"/>
franta-hg@0
   354
            <sequential>
franta-hg@6
   355
                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
franta-hg@0
   356
                    <batchtest todir="${build.test.results.dir}">
franta-hg@0
   357
                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
franta-hg@0
   358
                            <filename name="@{testincludes}"/>
franta-hg@0
   359
                        </fileset>
franta-hg@0
   360
                    </batchtest>
franta-hg@0
   361
                    <classpath>
franta-hg@6
   362
                        <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
franta-hg@0
   363
                    </classpath>
franta-hg@0
   364
                    <syspropertyset>
franta-hg@0
   365
                        <propertyref prefix="test-sys-prop."/>
franta-hg@0
   366
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@0
   367
                    </syspropertyset>
franta-hg@0
   368
                    <formatter type="brief" usefile="false"/>
franta-hg@0
   369
                    <formatter type="xml"/>
franta-hg@6
   370
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@186
   371
                    <jvmarg value="-ea"/>
franta-hg@0
   372
                    <jvmarg line="${runmain.jvmargs}"/>
franta-hg@0
   373
                </junit>
franta-hg@0
   374
            </sequential>
franta-hg@0
   375
        </macrodef>
franta-hg@0
   376
    </target>
franta-hg@0
   377
    <target name="-init-macrodef-java">
franta-hg@0
   378
        <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@0
   379
            <attribute default="${main.class}" name="classname"/>
franta-hg@0
   380
            <attribute default="${debug.classpath}" name="classpath"/>
franta-hg@0
   381
            <element name="customize" optional="true"/>
franta-hg@0
   382
            <sequential>
franta-hg@0
   383
                <java classname="@{classname}" fork="true">
franta-hg@6
   384
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@0
   385
                    <jvmarg line="${runmain.jvmargs}"/>
franta-hg@0
   386
                    <classpath>
franta-hg@0
   387
                        <path path="@{classpath}:${j2ee.platform.classpath}"/>
franta-hg@0
   388
                    </classpath>
franta-hg@0
   389
                    <syspropertyset>
franta-hg@0
   390
                        <propertyref prefix="run-sys-prop."/>
franta-hg@0
   391
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@0
   392
                    </syspropertyset>
franta-hg@0
   393
                    <customize/>
franta-hg@0
   394
                </java>
franta-hg@0
   395
            </sequential>
franta-hg@0
   396
        </macrodef>
franta-hg@0
   397
    </target>
franta-hg@0
   398
    <target name="-init-macrodef-nbjsdebug">
franta-hg@0
   399
        <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@0
   400
            <attribute default="${client.url}" name="webUrl"/>
franta-hg@0
   401
            <sequential>
franta-hg@0
   402
                <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
franta-hg@0
   403
            </sequential>
franta-hg@0
   404
        </macrodef>
franta-hg@0
   405
    </target>
franta-hg@0
   406
    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
franta-hg@0
   407
        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@0
   408
            <attribute default="${main.class}" name="name"/>
franta-hg@0
   409
            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@0
   410
            <sequential>
franta-hg@0
   411
                <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
franta-hg@0
   412
                    <classpath>
franta-hg@0
   413
                        <path path="@{classpath}"/>
franta-hg@0
   414
                    </classpath>
franta-hg@0
   415
                </nbjpdastart>
franta-hg@0
   416
            </sequential>
franta-hg@0
   417
        </macrodef>
franta-hg@0
   418
        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@0
   419
            <attribute default="${build.classes.dir}" name="dir"/>
franta-hg@0
   420
            <sequential>
franta-hg@0
   421
                <nbjpdareload>
franta-hg@0
   422
                    <fileset dir="@{dir}" includes="${fix.classes}">
franta-hg@0
   423
                        <include name="${fix.includes}*.class"/>
franta-hg@0
   424
                    </fileset>
franta-hg@0
   425
                </nbjpdareload>
franta-hg@0
   426
            </sequential>
franta-hg@0
   427
        </macrodef>
franta-hg@0
   428
        <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@0
   429
            <sequential>
franta-hg@0
   430
                <nbjpdaappreloaded/>
franta-hg@0
   431
            </sequential>
franta-hg@0
   432
        </macrodef>
franta-hg@0
   433
    </target>
franta-hg@0
   434
    <target name="-init-debug-args">
franta-hg@0
   435
        <property name="version-output" value="java version &quot;${ant.java.version}"/>
franta-hg@0
   436
        <condition property="have-jdk-older-than-1.4">
franta-hg@0
   437
            <or>
franta-hg@0
   438
                <contains string="${version-output}" substring="java version &quot;1.0"/>
franta-hg@0
   439
                <contains string="${version-output}" substring="java version &quot;1.1"/>
franta-hg@0
   440
                <contains string="${version-output}" substring="java version &quot;1.2"/>
franta-hg@0
   441
                <contains string="${version-output}" substring="java version &quot;1.3"/>
franta-hg@0
   442
            </or>
franta-hg@0
   443
        </condition>
franta-hg@0
   444
        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
franta-hg@0
   445
            <istrue value="${have-jdk-older-than-1.4}"/>
franta-hg@0
   446
        </condition>
franta-hg@0
   447
        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
franta-hg@0
   448
            <os family="windows"/>
franta-hg@0
   449
        </condition>
franta-hg@0
   450
        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
franta-hg@0
   451
            <isset property="debug.transport"/>
franta-hg@0
   452
        </condition>
franta-hg@0
   453
    </target>
franta-hg@0
   454
    <target depends="-init-debug-args" name="-init-macrodef-debug">
franta-hg@0
   455
        <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@0
   456
            <attribute default="${main.class}" name="classname"/>
franta-hg@0
   457
            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@0
   458
            <attribute default="${application.args.param}" name="args"/>
franta-hg@0
   459
            <element name="customize" optional="true"/>
franta-hg@0
   460
            <sequential>
franta-hg@0
   461
                <java classname="@{classname}" fork="true">
franta-hg@6
   462
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@0
   463
                    <jvmarg line="${debug-args-line}"/>
franta-hg@0
   464
                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
franta-hg@0
   465
                    <jvmarg line="${runmain.jvmargs}"/>
franta-hg@0
   466
                    <classpath>
franta-hg@0
   467
                        <path path="@{classpath}"/>
franta-hg@0
   468
                    </classpath>
franta-hg@0
   469
                    <syspropertyset>
franta-hg@0
   470
                        <propertyref prefix="run-sys-prop."/>
franta-hg@0
   471
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@0
   472
                    </syspropertyset>
franta-hg@0
   473
                    <arg line="@{args}"/>
franta-hg@0
   474
                    <customize/>
franta-hg@0
   475
                </java>
franta-hg@0
   476
            </sequential>
franta-hg@0
   477
        </macrodef>
franta-hg@0
   478
    </target>
franta-hg@0
   479
    <target name="-init-taskdefs">
franta-hg@0
   480
        <fail unless="libs.CopyLibs.classpath">
franta-hg@0
   481
The libs.CopyLibs.classpath property is not set up.
franta-hg@0
   482
This property must point to 
franta-hg@0
   483
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
franta-hg@0
   484
of NetBeans IDE installation and is usually located at 
franta-hg@0
   485
&lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
franta-hg@0
   486
Either open the project in the IDE and make sure CopyLibs library
franta-hg@0
   487
exists or setup the property manually. For example like this:
franta-hg@0
   488
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
franta-hg@0
   489
                </fail>
franta-hg@0
   490
        <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
franta-hg@0
   491
    </target>
franta-hg@142
   492
    <target name="-init-ap-cmdline-properties">
franta-hg@142
   493
        <property name="annotation.processing.enabled" value="true"/>
franta-hg@142
   494
        <property name="annotation.processing.processors.list" value=""/>
franta-hg@142
   495
        <property name="annotation.processing.run.all.processors" value="true"/>
franta-hg@142
   496
        <property name="javac.processorpath" value="${javac.classpath}"/>
franta-hg@142
   497
        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
franta-hg@142
   498
        <condition property="ap.supported.internal" value="true">
franta-hg@142
   499
            <not>
franta-hg@142
   500
                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
franta-hg@142
   501
            </not>
franta-hg@142
   502
        </condition>
franta-hg@142
   503
    </target>
franta-hg@142
   504
    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
franta-hg@142
   505
        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
franta-hg@142
   506
            <isfalse value="${annotation.processing.run.all.processors}"/>
franta-hg@142
   507
        </condition>
franta-hg@142
   508
        <condition else="" property="ap.proc.none.internal" value="-proc:none">
franta-hg@142
   509
            <isfalse value="${annotation.processing.enabled}"/>
franta-hg@142
   510
        </condition>
franta-hg@142
   511
    </target>
franta-hg@142
   512
    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
franta-hg@142
   513
        <property name="ap.cmd.line.internal" value=""/>
franta-hg@142
   514
    </target>
franta-hg@186
   515
    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
franta-hg@186
   516
    <target name="-profile-pre-init">
franta-hg@186
   517
        <!-- Empty placeholder for easier customization. -->
franta-hg@186
   518
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   519
    </target>
franta-hg@186
   520
    <target name="-profile-post-init">
franta-hg@186
   521
        <!-- Empty placeholder for easier customization. -->
franta-hg@186
   522
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   523
    </target>
franta-hg@186
   524
    <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
franta-hg@186
   525
        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
franta-hg@186
   526
        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
franta-hg@186
   527
    </target>
franta-hg@142
   528
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
franta-hg@0
   529
    <!--
franta-hg@0
   530
                COMPILATION SECTION
franta-hg@0
   531
            -->
franta-hg@27
   532
    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps">
franta-hg@27
   533
        <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="jar">
franta-hg@27
   534
            <property name="deploy.on.save" value="false"/>
franta-hg@27
   535
        </ant>
franta-hg@27
   536
    </target>
franta-hg@27
   537
    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
franta-hg@27
   538
        <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="jar">
franta-hg@27
   539
            <property name="deploy.on.save" value="false"/>
franta-hg@27
   540
        </ant>
franta-hg@27
   541
    </target>
franta-hg@0
   542
    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
franta-hg@75
   543
    <target depends="init,deps-jar,generate-rest-config" name="-pre-pre-compile">
franta-hg@0
   544
        <mkdir dir="${build.classes.dir}"/>
franta-hg@0
   545
    </target>
franta-hg@0
   546
    <target name="-pre-compile">
franta-hg@0
   547
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   548
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   549
    </target>
franta-hg@0
   550
    <target name="-copy-webdir">
franta-hg@0
   551
        <copy todir="${build.web.dir}">
franta-hg@0
   552
            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
franta-hg@0
   553
        </copy>
franta-hg@0
   554
        <copy todir="${build.web.dir}/WEB-INF">
franta-hg@0
   555
            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
franta-hg@0
   556
        </copy>
franta-hg@0
   557
    </target>
franta-hg@0
   558
    <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">
franta-hg@0
   559
        <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
franta-hg@0
   560
        <copy todir="${build.classes.dir}">
franta-hg@0
   561
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@0
   562
        </copy>
franta-hg@0
   563
    </target>
franta-hg@0
   564
    <target if="has.custom.manifest" name="-copy-manifest">
franta-hg@0
   565
        <mkdir dir="${build.meta.inf.dir}"/>
franta-hg@0
   566
        <copy todir="${build.meta.inf.dir}">
franta-hg@0
   567
            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
franta-hg@0
   568
        </copy>
franta-hg@0
   569
    </target>
franta-hg@0
   570
    <target if="has.persistence.xml" name="-copy-persistence-xml">
franta-hg@0
   571
        <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
franta-hg@0
   572
        <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
franta-hg@0
   573
            <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
franta-hg@0
   574
        </copy>
franta-hg@0
   575
    </target>
franta-hg@0
   576
    <target name="-post-compile">
franta-hg@0
   577
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   578
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   579
    </target>
franta-hg@0
   580
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
franta-hg@0
   581
    <target name="-pre-compile-single">
franta-hg@0
   582
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   583
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   584
    </target>
franta-hg@0
   585
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
franta-hg@0
   586
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
franta-hg@0
   587
        <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
franta-hg@0
   588
        <copy todir="${build.classes.dir}">
franta-hg@0
   589
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@0
   590
        </copy>
franta-hg@0
   591
    </target>
franta-hg@0
   592
    <target name="-post-compile-single">
franta-hg@0
   593
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   594
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   595
    </target>
franta-hg@0
   596
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
franta-hg@186
   597
    <property name="jspc.schemas" value="/resources/schemas/"/>
franta-hg@186
   598
    <property name="jspc.dtds" value="/resources/dtds/"/>
franta-hg@0
   599
    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
franta-hg@0
   600
        <mkdir dir="${build.generated.dir}/src"/>
franta-hg@0
   601
        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
franta-hg@0
   602
            <arg value="-uriroot"/>
franta-hg@0
   603
            <arg file="${basedir}/${build.web.dir}"/>
franta-hg@0
   604
            <arg value="-d"/>
franta-hg@0
   605
            <arg file="${basedir}/${build.generated.dir}/src"/>
franta-hg@0
   606
            <arg value="-die1"/>
franta-hg@186
   607
            <arg value="-schemas ${jspc.schemas}"/>
franta-hg@186
   608
            <arg value="-dtds ${jspc.dtds}"/>
franta-hg@0
   609
            <arg value="-compilerSourceVM ${javac.source}"/>
franta-hg@0
   610
            <arg value="-compilerTargetVM ${javac.target}"/>
franta-hg@0
   611
            <arg value="-javaEncoding ${source.encoding}"/>
franta-hg@186
   612
            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
franta-hg@142
   613
            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
franta-hg@0
   614
        </java>
franta-hg@0
   615
        <mkdir dir="${build.generated.dir}/classes"/>
franta-hg@142
   616
        <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
franta-hg@0
   617
    </target>
franta-hg@0
   618
    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
franta-hg@0
   619
        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
franta-hg@0
   620
        <mkdir dir="${build.generated.dir}/src"/>
franta-hg@0
   621
        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
franta-hg@0
   622
            <arg value="-uriroot"/>
franta-hg@0
   623
            <arg file="${basedir}/${build.web.dir}"/>
franta-hg@0
   624
            <arg value="-d"/>
franta-hg@0
   625
            <arg file="${basedir}/${build.generated.dir}/src"/>
franta-hg@0
   626
            <arg value="-die1"/>
franta-hg@186
   627
            <arg value="-schemas ${jspc.schemas}"/>
franta-hg@186
   628
            <arg value="-dtds ${jspc.dtds}"/>
franta-hg@186
   629
            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
franta-hg@0
   630
            <arg value="-jspc.files"/>
franta-hg@0
   631
            <arg path="${jsp.includes}"/>
franta-hg@0
   632
            <arg value="-compilerSourceVM ${javac.source}"/>
franta-hg@0
   633
            <arg value="-compilerTargetVM ${javac.target}"/>
franta-hg@0
   634
            <arg value="-javaEncoding ${source.encoding}"/>
franta-hg@142
   635
            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
franta-hg@0
   636
        </java>
franta-hg@0
   637
        <mkdir dir="${build.generated.dir}/classes"/>
franta-hg@142
   638
        <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
franta-hg@0
   639
            <customize>
franta-hg@0
   640
                <patternset includes="${javac.jsp.includes}"/>
franta-hg@0
   641
            </customize>
franta-hg@0
   642
        </webproject2:javac>
franta-hg@0
   643
    </target>
franta-hg@0
   644
    <target name="compile-single-jsp">
franta-hg@0
   645
        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
franta-hg@0
   646
        <antcall target="-do-compile-single-jsp"/>
franta-hg@0
   647
    </target>
franta-hg@0
   648
    <!--
franta-hg@0
   649
                DIST BUILDING SECTION
franta-hg@0
   650
            -->
franta-hg@0
   651
    <target name="-pre-dist">
franta-hg@0
   652
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   653
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   654
    </target>
franta-hg@0
   655
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
franta-hg@0
   656
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@0
   657
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@0
   658
        <jar compress="${jar.compress}" jarfile="${dist.war}">
franta-hg@0
   659
            <fileset dir="${build.web.dir}"/>
franta-hg@0
   660
        </jar>
franta-hg@0
   661
    </target>
franta-hg@0
   662
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
franta-hg@0
   663
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@0
   664
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@0
   665
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
franta-hg@0
   666
            <fileset dir="${build.web.dir}"/>
franta-hg@0
   667
        </jar>
franta-hg@0
   668
    </target>
franta-hg@0
   669
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
franta-hg@0
   670
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@0
   671
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@0
   672
        <jar compress="${jar.compress}" jarfile="${dist.war}">
franta-hg@0
   673
            <fileset dir="${build.web.dir}"/>
franta-hg@0
   674
        </jar>
franta-hg@0
   675
    </target>
franta-hg@0
   676
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
franta-hg@0
   677
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@0
   678
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@0
   679
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
franta-hg@0
   680
            <fileset dir="${build.web.dir}"/>
franta-hg@0
   681
        </jar>
franta-hg@0
   682
    </target>
franta-hg@0
   683
    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
franta-hg@0
   684
    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
franta-hg@27
   685
        <copyfiles files="${reference.nekurak_net-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
franta-hg@83
   686
        <copyfiles files="${libs.Kaptcha.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
franta-hg@0
   687
        <mkdir dir="${build.web.dir}/META-INF"/>
franta-hg@0
   688
        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
franta-hg@0
   689
    </target>
franta-hg@26
   690
    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
franta-hg@27
   691
        <copyfiles files="${reference.nekurak_net-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
franta-hg@83
   692
        <copyfiles files="${libs.Kaptcha.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
franta-hg@26
   693
    </target>
franta-hg@6
   694
    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
franta-hg@6
   695
        <delete dir="${build.web.dir}/WEB-INF/lib"/>
franta-hg@6
   696
    </target>
franta-hg@6
   697
    <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
franta-hg@0
   698
        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
franta-hg@0
   699
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@0
   700
        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
franta-hg@0
   701
            <fileset dir="${build.web.dir}"/>
franta-hg@0
   702
        </jar>
franta-hg@0
   703
    </target>
franta-hg@0
   704
    <target name="-post-dist">
franta-hg@0
   705
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   706
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   707
    </target>
franta-hg@0
   708
    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
franta-hg@6
   709
    <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
franta-hg@0
   710
    <!--
franta-hg@0
   711
                EXECUTION SECTION
franta-hg@0
   712
            -->
franta-hg@0
   713
    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
franta-hg@0
   714
    <target name="-pre-run-deploy">
franta-hg@0
   715
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   716
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   717
    </target>
franta-hg@0
   718
    <target name="-post-run-deploy">
franta-hg@0
   719
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   720
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   721
    </target>
franta-hg@0
   722
    <target name="-pre-nbmodule-run-deploy">
franta-hg@0
   723
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   724
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
franta-hg@0
   725
    </target>
franta-hg@0
   726
    <target name="-post-nbmodule-run-deploy">
franta-hg@0
   727
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   728
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
franta-hg@0
   729
    </target>
franta-hg@0
   730
    <target name="-run-deploy-am">
franta-hg@0
   731
        <!-- Task to deploy to the Access Manager runtime. -->
franta-hg@0
   732
    </target>
franta-hg@197
   733
    <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,-do-update-breakpoints" name="run-deploy"/>
franta-hg@0
   734
    <target if="netbeans.home" name="-run-deploy-nb">
franta-hg@0
   735
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
franta-hg@0
   736
    </target>
franta-hg@0
   737
    <target name="-init-deploy-ant" unless="netbeans.home">
franta-hg@0
   738
        <property name="deploy.ant.archive" value="${dist.war}"/>
franta-hg@0
   739
        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
franta-hg@0
   740
        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
franta-hg@0
   741
        <property name="deploy.ant.enabled" value="true"/>
franta-hg@0
   742
    </target>
franta-hg@0
   743
    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
franta-hg@0
   744
    <target if="netbeans.home" name="-run-undeploy-nb">
franta-hg@0
   745
        <fail message="Undeploy is not supported from within the IDE"/>
franta-hg@0
   746
    </target>
franta-hg@0
   747
    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
franta-hg@0
   748
        <nbverify file="${dist.war}"/>
franta-hg@0
   749
    </target>
franta-hg@0
   750
    <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
franta-hg@0
   751
    <target if="do.display.browser" name="-init-display-browser">
franta-hg@0
   752
        <condition property="do.display.browser.nb">
franta-hg@0
   753
            <isset property="netbeans.home"/>
franta-hg@0
   754
        </condition>
franta-hg@0
   755
        <condition property="do.display.browser.cl">
franta-hg@0
   756
            <isset property="deploy.ant.enabled"/>
franta-hg@0
   757
        </condition>
franta-hg@0
   758
    </target>
franta-hg@0
   759
    <target if="do.display.browser.nb" name="-display-browser-nb">
franta-hg@0
   760
        <nbbrowse url="${client.url}"/>
franta-hg@0
   761
    </target>
franta-hg@0
   762
    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
franta-hg@0
   763
        <condition property="browser" value="rundll32">
franta-hg@0
   764
            <os family="windows"/>
franta-hg@0
   765
        </condition>
franta-hg@0
   766
        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
franta-hg@0
   767
            <os family="windows"/>
franta-hg@0
   768
        </condition>
franta-hg@0
   769
        <condition property="browser" value="/usr/bin/open">
franta-hg@0
   770
            <os family="mac"/>
franta-hg@0
   771
        </condition>
franta-hg@0
   772
        <property environment="env"/>
franta-hg@0
   773
        <condition property="browser" value="${env.BROWSER}">
franta-hg@0
   774
            <isset property="env.BROWSER"/>
franta-hg@0
   775
        </condition>
franta-hg@0
   776
        <condition property="browser" value="/usr/bin/firefox">
franta-hg@0
   777
            <available file="/usr/bin/firefox"/>
franta-hg@0
   778
        </condition>
franta-hg@0
   779
        <condition property="browser" value="/usr/local/firefox/firefox">
franta-hg@0
   780
            <available file="/usr/local/firefox/firefox"/>
franta-hg@0
   781
        </condition>
franta-hg@0
   782
        <condition property="browser" value="/usr/bin/mozilla">
franta-hg@0
   783
            <available file="/usr/bin/mozilla"/>
franta-hg@0
   784
        </condition>
franta-hg@0
   785
        <condition property="browser" value="/usr/local/mozilla/mozilla">
franta-hg@0
   786
            <available file="/usr/local/mozilla/mozilla"/>
franta-hg@0
   787
        </condition>
franta-hg@0
   788
        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
franta-hg@0
   789
            <available file="/usr/sfw/lib/firefox/firefox"/>
franta-hg@0
   790
        </condition>
franta-hg@0
   791
        <condition property="browser" value="/opt/csw/bin/firefox">
franta-hg@0
   792
            <available file="/opt/csw/bin/firefox"/>
franta-hg@0
   793
        </condition>
franta-hg@0
   794
        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
franta-hg@0
   795
            <available file="/usr/sfw/lib/mozilla/mozilla"/>
franta-hg@0
   796
        </condition>
franta-hg@0
   797
        <condition property="browser" value="/opt/csw/bin/mozilla">
franta-hg@0
   798
            <available file="/opt/csw/bin/mozilla"/>
franta-hg@0
   799
        </condition>
franta-hg@0
   800
    </target>
franta-hg@0
   801
    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
franta-hg@0
   802
        <fail unless="browser">
franta-hg@0
   803
                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
franta-hg@0
   804
                </fail>
franta-hg@0
   805
        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
franta-hg@0
   806
        <echo>Launching ${browse.url}</echo>
franta-hg@0
   807
        <exec executable="${browser}" spawn="true">
franta-hg@0
   808
            <arg line="${browser.args} ${browse.url}"/>
franta-hg@0
   809
        </exec>
franta-hg@0
   810
    </target>
franta-hg@0
   811
    <target depends="init,-init-cos,compile-single" name="run-main">
franta-hg@0
   812
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
franta-hg@0
   813
        <webproject1:java classname="${run.class}"/>
franta-hg@0
   814
    </target>
franta-hg@0
   815
    <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
franta-hg@0
   816
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
franta-hg@0
   817
        <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
franta-hg@0
   818
    </target>
franta-hg@197
   819
    <target depends="init" if="netbeans.home" name="-do-update-breakpoints">
franta-hg@197
   820
        <webproject1:nbjpdaappreloaded/>
franta-hg@197
   821
    </target>
franta-hg@0
   822
    <!--
franta-hg@0
   823
                DEBUGGING SECTION
franta-hg@0
   824
            -->
franta-hg@6
   825
    <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
franta-hg@0
   826
        <nbstartserver debugmode="true"/>
franta-hg@0
   827
        <antcall target="connect-debugger"/>
franta-hg@0
   828
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
franta-hg@0
   829
        <antcall target="debug-display-browser"/>
franta-hg@0
   830
        <antcall target="connect-client-debugger"/>
franta-hg@0
   831
    </target>
franta-hg@0
   832
    <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
franta-hg@0
   833
        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
franta-hg@0
   834
            <classpath>
franta-hg@0
   835
                <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
franta-hg@0
   836
            </classpath>
franta-hg@0
   837
            <sourcepath>
franta-hg@0
   838
                <path path="${web.docbase.dir}"/>
franta-hg@0
   839
            </sourcepath>
franta-hg@0
   840
        </nbjpdaconnect>
franta-hg@0
   841
    </target>
franta-hg@0
   842
    <target if="do.display.browser.debug" name="debug-display-browser">
franta-hg@0
   843
        <nbbrowse url="${client.url}"/>
franta-hg@0
   844
    </target>
franta-hg@0
   845
    <target if="do.debug.client" name="connect-client-debugger">
franta-hg@0
   846
        <webproject1:nbjsdebugstart webUrl="${client.url}"/>
franta-hg@0
   847
    </target>
franta-hg@0
   848
    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
franta-hg@0
   849
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
franta-hg@0
   850
        <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
franta-hg@0
   851
    </target>
franta-hg@0
   852
    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
franta-hg@0
   853
    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
franta-hg@0
   854
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
franta-hg@0
   855
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
franta-hg@0
   856
    </target>
franta-hg@0
   857
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
franta-hg@0
   858
        <webproject1:nbjpdastart name="${debug.class}"/>
franta-hg@0
   859
    </target>
franta-hg@0
   860
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
franta-hg@0
   861
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
franta-hg@0
   862
        <webproject1:debug classname="${debug.class}"/>
franta-hg@0
   863
    </target>
franta-hg@0
   864
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
franta-hg@0
   865
    <target depends="init" name="-pre-debug-fix">
franta-hg@0
   866
        <fail unless="fix.includes">Must set fix.includes</fail>
franta-hg@0
   867
        <property name="javac.includes" value="${fix.includes}.java"/>
franta-hg@0
   868
    </target>
franta-hg@0
   869
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
franta-hg@0
   870
        <webproject1:nbjpdareload/>
franta-hg@0
   871
    </target>
franta-hg@0
   872
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
franta-hg@0
   873
    <!--
franta-hg@186
   874
            =================
franta-hg@186
   875
            PROFILING SECTION
franta-hg@186
   876
            =================
franta-hg@186
   877
            -->
franta-hg@186
   878
    <target description="Profile a J2EE project in the IDE." name="profile">
franta-hg@186
   879
        <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
franta-hg@186
   880
            <isset property="profiler.info.jvmargs.extra"/>
franta-hg@186
   881
        </condition>
franta-hg@186
   882
        <antcall target="${profiler.startserver.target}"/>
franta-hg@186
   883
        <antcall target="run"/>
franta-hg@186
   884
        <antcall target="start-loadgen"/>
franta-hg@186
   885
    </target>
franta-hg@186
   886
    <target name="start-profiled-server">
franta-hg@186
   887
        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
franta-hg@186
   888
            <jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@186
   889
            <jvmarg value="${profiler.j2ee.agentID}"/>
franta-hg@186
   890
        </nbstartprofiledserver>
franta-hg@186
   891
    </target>
franta-hg@186
   892
    <target name="start-profiled-server-extraargs">
franta-hg@186
   893
        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
franta-hg@186
   894
            <jvmarg value="${profiler.info.jvmargs.extra}"/>
franta-hg@186
   895
            <jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@186
   896
            <jvmarg value="${profiler.j2ee.agentID}"/>
franta-hg@186
   897
        </nbstartprofiledserver>
franta-hg@186
   898
    </target>
franta-hg@186
   899
    <target if="profiler.loadgen.path" name="start-loadgen">
franta-hg@186
   900
        <loadgenstart path="${profiler.loadgen.path}"/>
franta-hg@186
   901
    </target>
franta-hg@186
   902
    <!--
franta-hg@0
   903
                JAVADOC SECTION
franta-hg@0
   904
            -->
franta-hg@142
   905
    <target depends="init" if="have.sources" name="javadoc-build">
franta-hg@0
   906
        <mkdir dir="${dist.javadoc.dir}"/>
franta-hg@0
   907
        <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@0
   908
            <classpath>
franta-hg@0
   909
                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
franta-hg@0
   910
            </classpath>
franta-hg@0
   911
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
franta-hg@0
   912
                <filename name="**/*.java"/>
franta-hg@0
   913
            </fileset>
franta-hg@0
   914
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
franta-hg@0
   915
                <include name="**/*.java"/>
franta-hg@0
   916
            </fileset>
franta-hg@0
   917
        </javadoc>
franta-hg@151
   918
        <copy todir="${dist.javadoc.dir}">
franta-hg@151
   919
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
franta-hg@151
   920
                <filename name="**/doc-files/**"/>
franta-hg@151
   921
            </fileset>
franta-hg@151
   922
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
franta-hg@151
   923
                <include name="**/doc-files/**"/>
franta-hg@151
   924
            </fileset>
franta-hg@151
   925
        </copy>
franta-hg@0
   926
    </target>
franta-hg@0
   927
    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
franta-hg@0
   928
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
franta-hg@0
   929
    </target>
franta-hg@0
   930
    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
franta-hg@0
   931
    <!--
franta-hg@0
   932
                
franta-hg@0
   933
                JUNIT COMPILATION SECTION
franta-hg@0
   934
            -->
franta-hg@0
   935
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
franta-hg@0
   936
        <mkdir dir="${build.test.classes.dir}"/>
franta-hg@6
   937
        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
franta-hg@0
   938
    </target>
franta-hg@0
   939
    <target name="-pre-compile-test">
franta-hg@0
   940
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   941
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   942
    </target>
franta-hg@0
   943
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
franta-hg@6
   944
        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
franta-hg@0
   945
        <copy todir="${build.test.classes.dir}">
franta-hg@0
   946
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@0
   947
        </copy>
franta-hg@0
   948
    </target>
franta-hg@0
   949
    <target name="-post-compile-test">
franta-hg@0
   950
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   951
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   952
    </target>
franta-hg@0
   953
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
franta-hg@0
   954
    <target name="-pre-compile-test-single">
franta-hg@0
   955
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   956
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   957
    </target>
franta-hg@0
   958
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
franta-hg@0
   959
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
franta-hg@6
   960
        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
franta-hg@0
   961
        <copy todir="${build.test.classes.dir}">
franta-hg@0
   962
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@0
   963
        </copy>
franta-hg@0
   964
    </target>
franta-hg@0
   965
    <target name="-post-compile-test-single">
franta-hg@0
   966
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
   967
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
   968
    </target>
franta-hg@0
   969
    <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@0
   970
    <!--
franta-hg@0
   971
                
franta-hg@0
   972
                JUNIT EXECUTION SECTION
franta-hg@0
   973
            -->
franta-hg@0
   974
    <target depends="init" if="have.tests" name="-pre-test-run">
franta-hg@0
   975
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@0
   976
    </target>
franta-hg@0
   977
    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
franta-hg@0
   978
        <webproject2:junit testincludes="**/*Test.java"/>
franta-hg@0
   979
    </target>
franta-hg@0
   980
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
franta-hg@0
   981
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@0
   982
    </target>
franta-hg@0
   983
    <target depends="init" if="have.tests" name="test-report"/>
franta-hg@0
   984
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
franta-hg@0
   985
    <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@0
   986
    <target depends="init" if="have.tests" name="-pre-test-run-single">
franta-hg@0
   987
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@0
   988
    </target>
franta-hg@0
   989
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
franta-hg@0
   990
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
franta-hg@0
   991
        <webproject2:junit excludes="" includes="${test.includes}"/>
franta-hg@0
   992
    </target>
franta-hg@0
   993
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
franta-hg@0
   994
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@0
   995
    </target>
franta-hg@0
   996
    <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@0
   997
    <!--
franta-hg@0
   998
                
franta-hg@0
   999
                JUNIT DEBUGGING SECTION
franta-hg@0
  1000
            -->
franta-hg@0
  1001
    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
franta-hg@0
  1002
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
franta-hg@0
  1003
        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
franta-hg@0
  1004
        <delete file="${test.report.file}"/>
franta-hg@0
  1005
        <!-- must exist, otherwise the XML formatter would fail -->
franta-hg@0
  1006
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@6
  1007
        <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
franta-hg@0
  1008
            <customize>
franta-hg@0
  1009
                <arg value="showoutput=true"/>
franta-hg@0
  1010
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
franta-hg@0
  1011
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
franta-hg@0
  1012
            </customize>
franta-hg@0
  1013
        </webproject1:debug>
franta-hg@0
  1014
    </target>
franta-hg@0
  1015
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
franta-hg@0
  1016
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
franta-hg@0
  1017
    </target>
franta-hg@0
  1018
    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
franta-hg@0
  1019
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
franta-hg@0
  1020
        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
franta-hg@0
  1021
    </target>
franta-hg@0
  1022
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
franta-hg@0
  1023
    <!--
franta-hg@186
  1024
        =========================
franta-hg@186
  1025
        TESTS PROFILING  SECTION
franta-hg@186
  1026
        =========================
franta-hg@186
  1027
        -->
franta-hg@186
  1028
    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
franta-hg@186
  1029
        <nbprofiledirect>
franta-hg@186
  1030
            <classpath>
franta-hg@186
  1031
                <path path="${run.test.classpath}"/>
franta-hg@186
  1032
                <path path="${j2ee.platform.classpath}"/>
franta-hg@186
  1033
            </classpath>
franta-hg@186
  1034
        </nbprofiledirect>
franta-hg@186
  1035
        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
franta-hg@186
  1036
            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
franta-hg@186
  1037
            <jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@186
  1038
            <jvmarg line="${profiler.info.jvmargs}"/>
franta-hg@186
  1039
            <test name="${profile.class}"/>
franta-hg@186
  1040
            <classpath>
franta-hg@186
  1041
                <path path="${run.test.classpath}"/>
franta-hg@186
  1042
                <path path="${j2ee.platform.classpath}"/>
franta-hg@186
  1043
            </classpath>
franta-hg@186
  1044
            <syspropertyset>
franta-hg@186
  1045
                <propertyref prefix="test-sys-prop."/>
franta-hg@186
  1046
                <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@186
  1047
            </syspropertyset>
franta-hg@186
  1048
            <formatter type="brief" usefile="false"/>
franta-hg@186
  1049
            <formatter type="xml"/>
franta-hg@186
  1050
        </junit>
franta-hg@186
  1051
    </target>
franta-hg@186
  1052
    <!--
franta-hg@0
  1053
                
franta-hg@0
  1054
                CLEANUP SECTION
franta-hg@0
  1055
            -->
franta-hg@197
  1056
    <target depends="init" name="deps-clean" unless="no.deps">
franta-hg@27
  1057
        <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="clean"/>
franta-hg@27
  1058
    </target>
franta-hg@0
  1059
    <target depends="init" name="do-clean">
franta-hg@0
  1060
        <condition property="build.dir.to.clean" value="${build.web.dir}">
franta-hg@0
  1061
            <isset property="dist.ear.dir"/>
franta-hg@0
  1062
        </condition>
franta-hg@0
  1063
        <property name="build.dir.to.clean" value="${build.web.dir}"/>
franta-hg@0
  1064
        <delete includeEmptyDirs="true" quiet="true">
franta-hg@0
  1065
            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
franta-hg@0
  1066
        </delete>
franta-hg@0
  1067
        <delete dir="${build.dir}"/>
franta-hg@0
  1068
        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
franta-hg@0
  1069
        <delete dir="${dist.dir}"/>
franta-hg@0
  1070
    </target>
franta-hg@0
  1071
    <target depends="do-clean" if="status.clean-failed" name="check-clean">
franta-hg@0
  1072
        <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@0
  1073
        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
franta-hg@0
  1074
    </target>
franta-hg@0
  1075
    <target depends="init" if="netbeans.home" name="undeploy-clean">
franta-hg@0
  1076
        <nbundeploy failOnError="false" startServer="false"/>
franta-hg@0
  1077
    </target>
franta-hg@0
  1078
    <target name="-post-clean">
franta-hg@0
  1079
        <!-- Empty placeholder for easier customization. -->
franta-hg@0
  1080
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@0
  1081
    </target>
franta-hg@0
  1082
    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
franta-hg@0
  1083
    <target depends="clean" description="Clean build products." name="clean-ear"/>
franta-hg@0
  1084
</project>