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