java/sql-vyuka/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Mon, 09 Nov 2020 19:00:45 +0100
changeset 87 5fff85c7f980
parent 82 956501cb9ec8
permissions -rw-r--r--
nové netbeans
franta-hg@8
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@8
     2
<!--
franta-hg@8
     3
        *** GENERATED FROM project.xml - DO NOT EDIT  ***
franta-hg@8
     4
        ***         EDIT ../build.xml INSTEAD         ***
franta-hg@8
     5
franta-hg@8
     6
        For the purpose of easier reading the script
franta-hg@8
     7
        is divided into following sections:
franta-hg@8
     8
        - initialization
franta-hg@8
     9
        - compilation
franta-hg@8
    10
        - dist
franta-hg@8
    11
        - execution
franta-hg@8
    12
        - debugging
franta-hg@8
    13
        - javadoc
franta-hg@82
    14
        - test compilation
franta-hg@82
    15
        - test execution
franta-hg@82
    16
        - test debugging
franta-hg@8
    17
        - cleanup
franta-hg@8
    18
franta-hg@8
    19
        -->
franta-hg@8
    20
<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="sql-vyuka-impl">
franta-hg@8
    21
    <import file="ant-deploy.xml"/>
fiki@46
    22
    <fail message="Please build using Ant 1.7.1 or higher.">
fiki@46
    23
        <condition>
fiki@46
    24
            <not>
fiki@46
    25
                <antversion atleast="1.7.1"/>
fiki@46
    26
            </not>
fiki@46
    27
        </condition>
fiki@46
    28
    </fail>
franta-hg@8
    29
    <target depends="dist,javadoc" description="Build whole project." name="default"/>
franta-hg@8
    30
    <!--
franta-hg@8
    31
                INITIALIZATION SECTION
franta-hg@8
    32
            -->
franta-hg@8
    33
    <target name="-pre-init">
franta-hg@8
    34
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
    35
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
    36
    </target>
franta-hg@8
    37
    <target depends="-pre-init" name="-init-private">
franta-hg@8
    38
        <property file="nbproject/private/private.properties"/>
franta-hg@8
    39
    </target>
franta-hg@8
    40
    <target depends="-pre-init,-init-private" name="-init-user">
franta-hg@8
    41
        <property file="${user.properties.file}"/>
franta-hg@8
    42
        <!-- The two properties below are usually overridden -->
franta-hg@8
    43
        <!-- by the active platform. Just a fallback. -->
franta-hg@8
    44
        <property name="default.javac.source" value="1.4"/>
franta-hg@8
    45
        <property name="default.javac.target" value="1.4"/>
franta-hg@8
    46
    </target>
franta-hg@8
    47
    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
franta-hg@8
    48
        <property file="nbproject/project.properties"/>
franta-hg@8
    49
    </target>
franta-hg@8
    50
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
franta-hg@8
    51
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
franta-hg@8
    52
        <condition property="have.tests">
franta-hg@8
    53
            <or>
franta-hg@8
    54
                <available file="${test.src.dir}"/>
franta-hg@8
    55
            </or>
franta-hg@8
    56
        </condition>
franta-hg@8
    57
        <condition property="have.sources">
franta-hg@8
    58
            <or>
franta-hg@8
    59
                <available file="${src.dir}"/>
franta-hg@8
    60
            </or>
franta-hg@8
    61
        </condition>
franta-hg@8
    62
        <condition property="netbeans.home+have.tests">
franta-hg@8
    63
            <and>
franta-hg@8
    64
                <isset property="netbeans.home"/>
franta-hg@8
    65
                <isset property="have.tests"/>
franta-hg@8
    66
            </and>
franta-hg@8
    67
        </condition>
franta-hg@8
    68
        <condition property="no.javadoc.preview">
franta-hg@8
    69
            <isfalse value="${javadoc.preview}"/>
franta-hg@8
    70
        </condition>
franta-hg@8
    71
        <property name="javac.compilerargs" value=""/>
franta-hg@8
    72
        <condition property="no.deps">
franta-hg@8
    73
            <and>
franta-hg@8
    74
                <istrue value="${no.dependencies}"/>
franta-hg@8
    75
            </and>
franta-hg@8
    76
        </condition>
franta-hg@8
    77
        <condition property="no.dist.ear.dir">
franta-hg@8
    78
            <not>
franta-hg@8
    79
                <isset property="dist.ear.dir"/>
franta-hg@8
    80
            </not>
franta-hg@8
    81
        </condition>
franta-hg@8
    82
        <property name="build.web.excludes" value="${build.classes.excludes}"/>
franta-hg@8
    83
        <condition property="do.compile.jsps">
franta-hg@8
    84
            <istrue value="${compile.jsps}"/>
franta-hg@8
    85
        </condition>
franta-hg@8
    86
        <condition property="do.debug.server">
franta-hg@8
    87
            <or>
franta-hg@8
    88
                <not>
franta-hg@8
    89
                    <isset property="debug.server"/>
franta-hg@8
    90
                </not>
franta-hg@8
    91
                <istrue value="${debug.server}"/>
franta-hg@8
    92
                <and>
franta-hg@8
    93
                    <not>
franta-hg@8
    94
                        <istrue value="${debug.server}"/>
franta-hg@8
    95
                    </not>
franta-hg@8
    96
                    <not>
franta-hg@8
    97
                        <istrue value="${debug.client}"/>
franta-hg@8
    98
                    </not>
franta-hg@8
    99
                </and>
franta-hg@8
   100
            </or>
franta-hg@8
   101
        </condition>
franta-hg@8
   102
        <condition property="do.debug.client">
franta-hg@8
   103
            <istrue value="${debug.client}"/>
franta-hg@8
   104
        </condition>
franta-hg@8
   105
        <condition property="do.display.browser">
franta-hg@8
   106
            <istrue value="${display.browser}"/>
franta-hg@8
   107
        </condition>
franta-hg@87
   108
        <condition property="do.display.browser.debug.old">
franta-hg@87
   109
            <and>
franta-hg@87
   110
                <isset property="do.display.browser"/>
franta-hg@87
   111
                <not>
franta-hg@87
   112
                    <isset property="do.debug.client"/>
franta-hg@87
   113
                </not>
franta-hg@87
   114
                <not>
franta-hg@87
   115
                    <isset property="browser.context"/>
franta-hg@87
   116
                </not>
franta-hg@87
   117
            </and>
franta-hg@87
   118
        </condition>
franta-hg@8
   119
        <condition property="do.display.browser.debug">
franta-hg@8
   120
            <and>
franta-hg@8
   121
                <isset property="do.display.browser"/>
franta-hg@8
   122
                <not>
franta-hg@8
   123
                    <isset property="do.debug.client"/>
franta-hg@8
   124
                </not>
franta-hg@87
   125
                <isset property="browser.context"/>
franta-hg@8
   126
            </and>
franta-hg@8
   127
        </condition>
franta-hg@8
   128
        <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
franta-hg@8
   129
        <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
franta-hg@8
   130
        <condition property="do.war.package.with.custom.manifest">
franta-hg@8
   131
            <isset property="has.custom.manifest"/>
franta-hg@8
   132
        </condition>
franta-hg@8
   133
        <condition property="do.war.package.without.custom.manifest">
franta-hg@8
   134
            <not>
franta-hg@8
   135
                <isset property="has.custom.manifest"/>
franta-hg@8
   136
            </not>
franta-hg@8
   137
        </condition>
franta-hg@8
   138
        <condition property="do.tmp.war.package.with.custom.manifest">
franta-hg@8
   139
            <and>
franta-hg@8
   140
                <isset property="has.custom.manifest"/>
franta-hg@74
   141
                <or>
franta-hg@74
   142
                    <isfalse value="${directory.deployment.supported}"/>
franta-hg@74
   143
                    <isset property="dist.ear.dir"/>
franta-hg@74
   144
                </or>
franta-hg@8
   145
            </and>
franta-hg@8
   146
        </condition>
franta-hg@8
   147
        <condition property="do.tmp.war.package.without.custom.manifest">
franta-hg@8
   148
            <and>
franta-hg@8
   149
                <not>
franta-hg@8
   150
                    <isset property="has.custom.manifest"/>
franta-hg@8
   151
                </not>
franta-hg@74
   152
                <or>
franta-hg@74
   153
                    <isfalse value="${directory.deployment.supported}"/>
franta-hg@74
   154
                    <isset property="dist.ear.dir"/>
franta-hg@74
   155
                </or>
franta-hg@8
   156
            </and>
franta-hg@8
   157
        </condition>
fiki@46
   158
        <condition property="do.tmp.war.package">
franta-hg@74
   159
            <or>
franta-hg@74
   160
                <isfalse value="${directory.deployment.supported}"/>
franta-hg@74
   161
                <isset property="dist.ear.dir"/>
franta-hg@74
   162
            </or>
fiki@46
   163
        </condition>
franta-hg@8
   164
        <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
franta-hg@8
   165
        <condition else="" property="application.args.param" value="${application.args}">
franta-hg@8
   166
            <and>
franta-hg@8
   167
                <isset property="application.args"/>
franta-hg@8
   168
                <not>
franta-hg@8
   169
                    <equals arg1="${application.args}" arg2="" trim="true"/>
franta-hg@8
   170
                </not>
franta-hg@8
   171
            </and>
franta-hg@8
   172
        </condition>
franta-hg@8
   173
        <property name="source.encoding" value="${file.encoding}"/>
franta-hg@8
   174
        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
franta-hg@8
   175
            <and>
franta-hg@8
   176
                <isset property="javadoc.encoding"/>
franta-hg@8
   177
                <not>
franta-hg@8
   178
                    <equals arg1="${javadoc.encoding}" arg2=""/>
franta-hg@8
   179
                </not>
franta-hg@8
   180
            </and>
franta-hg@8
   181
        </condition>
franta-hg@8
   182
        <property name="javadoc.encoding.used" value="${source.encoding}"/>
franta-hg@8
   183
        <property name="includes" value="**"/>
franta-hg@8
   184
        <property name="excludes" value=""/>
franta-hg@74
   185
        <property name="runmain.jvmargs" value=""/>
franta-hg@74
   186
        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
franta-hg@74
   187
        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
franta-hg@79
   188
            <and>
franta-hg@79
   189
                <isset property="endorsed.classpath"/>
franta-hg@79
   190
                <length length="0" string="${endorsed.classpath}" when="greater"/>
franta-hg@79
   191
            </and>
franta-hg@8
   192
        </condition>
franta-hg@79
   193
        <condition else="false" property="jdkBug6558476">
franta-hg@79
   194
            <and>
franta-hg@79
   195
                <matches pattern="1\.[56]" string="${java.specification.version}"/>
franta-hg@79
   196
                <not>
franta-hg@79
   197
                    <os family="unix"/>
franta-hg@79
   198
                </not>
franta-hg@79
   199
            </and>
franta-hg@79
   200
        </condition>
franta-hg@79
   201
        <property name="javac.fork" value="${jdkBug6558476}"/>
franta-hg@82
   202
        <condition property="junit.available">
franta-hg@82
   203
            <or>
franta-hg@82
   204
                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
franta-hg@82
   205
                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
franta-hg@82
   206
            </or>
franta-hg@82
   207
        </condition>
franta-hg@82
   208
        <condition property="testng.available">
franta-hg@82
   209
            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
franta-hg@82
   210
        </condition>
franta-hg@82
   211
        <condition property="junit+testng.available">
franta-hg@82
   212
            <and>
franta-hg@82
   213
                <istrue value="${junit.available}"/>
franta-hg@82
   214
                <istrue value="${testng.available}"/>
franta-hg@82
   215
            </and>
franta-hg@82
   216
        </condition>
franta-hg@82
   217
        <condition else="testng" property="testng.mode" value="mixed">
franta-hg@82
   218
            <istrue value="${junit+testng.available}"/>
franta-hg@82
   219
        </condition>
franta-hg@82
   220
        <condition else="" property="testng.debug.mode" value="-mixed">
franta-hg@82
   221
            <istrue value="${junit+testng.available}"/>
franta-hg@82
   222
        </condition>
franta-hg@8
   223
    </target>
franta-hg@8
   224
    <target depends="init" name="-init-cos" unless="deploy.on.save">
franta-hg@8
   225
        <condition property="deploy.on.save" value="true">
franta-hg@79
   226
            <or>
franta-hg@79
   227
                <istrue value="${j2ee.deploy.on.save}"/>
franta-hg@79
   228
                <istrue value="${j2ee.compile.on.save}"/>
franta-hg@79
   229
            </or>
franta-hg@8
   230
        </condition>
franta-hg@8
   231
    </target>
franta-hg@8
   232
    <target name="-post-init">
franta-hg@8
   233
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
   234
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
   235
    </target>
franta-hg@8
   236
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
franta-hg@8
   237
        <fail unless="src.dir">Must set src.dir</fail>
franta-hg@8
   238
        <fail unless="test.src.dir">Must set test.src.dir</fail>
franta-hg@8
   239
        <fail unless="build.dir">Must set build.dir</fail>
franta-hg@8
   240
        <fail unless="build.web.dir">Must set build.web.dir</fail>
franta-hg@8
   241
        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
franta-hg@8
   242
        <fail unless="dist.dir">Must set dist.dir</fail>
franta-hg@8
   243
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
franta-hg@8
   244
        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
franta-hg@8
   245
        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
franta-hg@8
   246
        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
franta-hg@8
   247
        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
franta-hg@8
   248
        <fail unless="dist.war">Must set dist.war</fail>
franta-hg@79
   249
        <condition property="missing.j2ee.server.home">
franta-hg@79
   250
            <and>
franta-hg@79
   251
                <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>
franta-hg@79
   252
                <not>
franta-hg@79
   253
                    <isset property="j2ee.server.home"/>
franta-hg@79
   254
                </not>
franta-hg@79
   255
            </and>
franta-hg@79
   256
        </condition>
franta-hg@79
   257
        <fail if="missing.j2ee.server.home">
franta-hg@79
   258
The Java EE server classpath is not correctly set up - server home directory is missing.
franta-hg@79
   259
Either open the project in the IDE and assign the server or setup the server classpath manually.
franta-hg@79
   260
For example like this:
franta-hg@79
   261
   ant -Dj2ee.server.home=&lt;app_server_installation_directory&gt;
franta-hg@79
   262
                </fail>
franta-hg@8
   263
        <fail unless="j2ee.platform.classpath">
franta-hg@8
   264
The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
franta-hg@8
   265
Either open the project in the IDE and assign the server or setup the server classpath manually.
franta-hg@8
   266
For example like this:
franta-hg@8
   267
   ant -Duser.properties.file=&lt;path_to_property_file&gt; (where you put the property "j2ee.platform.classpath" in a .properties file)
franta-hg@8
   268
or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties file is used)
franta-hg@8
   269
                </fail>
franta-hg@8
   270
    </target>
franta-hg@8
   271
    <target name="-init-macrodef-property">
franta-hg@8
   272
        <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@8
   273
            <attribute name="name"/>
franta-hg@8
   274
            <attribute name="value"/>
franta-hg@8
   275
            <sequential>
franta-hg@8
   276
                <property name="@{name}" value="${@{value}}"/>
franta-hg@8
   277
            </sequential>
franta-hg@8
   278
        </macrodef>
franta-hg@8
   279
    </target>
franta-hg@79
   280
    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
franta-hg@8
   281
        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@8
   282
            <attribute default="${src.dir}" name="srcdir"/>
franta-hg@8
   283
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@8
   284
            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@79
   285
            <attribute default="${javac.processorpath}" name="processorpath"/>
franta-hg@79
   286
            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
franta-hg@79
   287
            <attribute default="${includes}" name="includes"/>
franta-hg@79
   288
            <attribute default="${excludes}" name="excludes"/>
franta-hg@79
   289
            <attribute default="${javac.debug}" name="debug"/>
franta-hg@79
   290
            <attribute default="${empty.dir}" name="gensrcdir"/>
franta-hg@79
   291
            <element name="customize" optional="true"/>
franta-hg@79
   292
            <sequential>
franta-hg@79
   293
                <property location="${build.dir}/empty" name="empty.dir"/>
franta-hg@79
   294
                <mkdir dir="${empty.dir}"/>
franta-hg@79
   295
                <mkdir dir="@{apgeneratedsrcdir}"/>
franta-hg@79
   296
                <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@79
   297
                    <src>
franta-hg@79
   298
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
franta-hg@79
   299
                            <include name="*"/>
franta-hg@79
   300
                        </dirset>
franta-hg@79
   301
                    </src>
franta-hg@79
   302
                    <classpath>
franta-hg@79
   303
                        <path path="@{classpath}"/>
franta-hg@79
   304
                    </classpath>
franta-hg@79
   305
                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@79
   306
                    <compilerarg line="${javac.compilerargs}"/>
franta-hg@79
   307
                    <compilerarg value="-processorpath"/>
franta-hg@79
   308
                    <compilerarg path="@{processorpath}:${empty.dir}"/>
franta-hg@79
   309
                    <compilerarg line="${ap.processors.internal}"/>
franta-hg@79
   310
                    <compilerarg value="-s"/>
franta-hg@79
   311
                    <compilerarg path="@{apgeneratedsrcdir}"/>
franta-hg@79
   312
                    <compilerarg line="${ap.proc.none.internal}"/>
franta-hg@79
   313
                    <customize/>
franta-hg@79
   314
                </javac>
franta-hg@79
   315
            </sequential>
franta-hg@79
   316
        </macrodef>
franta-hg@79
   317
    </target>
franta-hg@79
   318
    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
franta-hg@79
   319
        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@79
   320
            <attribute default="${src.dir}" name="srcdir"/>
franta-hg@79
   321
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@79
   322
            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@79
   323
            <attribute default="${javac.processorpath}" name="processorpath"/>
franta-hg@79
   324
            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
franta-hg@8
   325
            <attribute default="${includes}" name="includes"/>
franta-hg@8
   326
            <attribute default="${excludes}" name="excludes"/>
franta-hg@8
   327
            <attribute default="${javac.debug}" name="debug"/>
fiki@46
   328
            <attribute default="${empty.dir}" name="gensrcdir"/>
franta-hg@8
   329
            <element name="customize" optional="true"/>
franta-hg@8
   330
            <sequential>
fiki@46
   331
                <property location="${build.dir}/empty" name="empty.dir"/>
fiki@46
   332
                <mkdir dir="${empty.dir}"/>
franta-hg@8
   333
                <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}">
fiki@46
   334
                    <src>
fiki@46
   335
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
fiki@46
   336
                            <include name="*"/>
fiki@46
   337
                        </dirset>
fiki@46
   338
                    </src>
franta-hg@8
   339
                    <classpath>
franta-hg@8
   340
                        <path path="@{classpath}"/>
franta-hg@8
   341
                    </classpath>
franta-hg@74
   342
                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@74
   343
                    <compilerarg line="${javac.compilerargs}"/>
franta-hg@8
   344
                    <customize/>
franta-hg@8
   345
                </javac>
franta-hg@8
   346
            </sequential>
franta-hg@8
   347
        </macrodef>
franta-hg@8
   348
    </target>
franta-hg@79
   349
    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
franta-hg@79
   350
        <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@79
   351
            <attribute default="${src.dir}" name="srcdir"/>
franta-hg@79
   352
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@79
   353
            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@79
   354
            <sequential>
franta-hg@79
   355
                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
franta-hg@79
   356
                    <classpath>
franta-hg@79
   357
                        <path path="@{classpath}"/>
franta-hg@79
   358
                    </classpath>
franta-hg@79
   359
                </depend>
franta-hg@79
   360
            </sequential>
franta-hg@79
   361
        </macrodef>
franta-hg@79
   362
        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@79
   363
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@79
   364
            <sequential>
franta-hg@79
   365
                <fail unless="javac.includes">Must set javac.includes</fail>
franta-hg@79
   366
                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
franta-hg@79
   367
                    <path>
franta-hg@79
   368
                        <filelist dir="@{destdir}" files="${javac.includes}"/>
franta-hg@79
   369
                    </path>
franta-hg@79
   370
                    <globmapper from="*.java" to="*.class"/>
franta-hg@79
   371
                </pathconvert>
franta-hg@79
   372
                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
franta-hg@79
   373
                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
franta-hg@79
   374
                <delete>
franta-hg@79
   375
                    <files includesfile="${javac.includesfile.binary}"/>
franta-hg@79
   376
                </delete>
franta-hg@79
   377
                <delete file="${javac.includesfile.binary}"/>
franta-hg@79
   378
            </sequential>
franta-hg@79
   379
        </macrodef>
franta-hg@79
   380
    </target>
franta-hg@82
   381
    <target if="${junit.available}" name="-init-macrodef-junit-init">
franta-hg@82
   382
        <condition else="false" property="nb.junit.batch" value="true">
franta-hg@82
   383
            <and>
franta-hg@82
   384
                <istrue value="${junit.available}"/>
franta-hg@82
   385
                <not>
franta-hg@82
   386
                    <isset property="test.method"/>
franta-hg@82
   387
                </not>
franta-hg@82
   388
            </and>
franta-hg@82
   389
        </condition>
franta-hg@82
   390
        <condition else="false" property="nb.junit.single" value="true">
franta-hg@82
   391
            <and>
franta-hg@82
   392
                <istrue value="${junit.available}"/>
franta-hg@82
   393
                <isset property="test.method"/>
franta-hg@82
   394
            </and>
franta-hg@82
   395
        </condition>
franta-hg@82
   396
    </target>
franta-hg@82
   397
    <target name="-init-test-properties">
franta-hg@82
   398
        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
franta-hg@82
   399
        <property name="test.binarytestincludes" value=""/>
franta-hg@82
   400
        <property name="test.binaryexcludes" value=""/>
franta-hg@82
   401
    </target>
franta-hg@82
   402
    <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
franta-hg@8
   403
        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@8
   404
            <attribute default="${includes}" name="includes"/>
franta-hg@8
   405
            <attribute default="${excludes}" name="excludes"/>
franta-hg@8
   406
            <attribute default="**" name="testincludes"/>
franta-hg@82
   407
            <attribute default="" name="testmethods"/>
franta-hg@82
   408
            <element name="customize" optional="true"/>
franta-hg@8
   409
            <sequential>
franta-hg@74
   410
                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
franta-hg@82
   411
                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
franta-hg@8
   412
                    <syspropertyset>
franta-hg@8
   413
                        <propertyref prefix="test-sys-prop."/>
franta-hg@8
   414
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@8
   415
                    </syspropertyset>
franta-hg@8
   416
                    <formatter type="brief" usefile="false"/>
franta-hg@8
   417
                    <formatter type="xml"/>
franta-hg@79
   418
                    <jvmarg value="-ea"/>
franta-hg@82
   419
                    <customize/>
franta-hg@8
   420
                </junit>
franta-hg@8
   421
            </sequential>
franta-hg@8
   422
        </macrodef>
franta-hg@8
   423
    </target>
franta-hg@82
   424
    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
franta-hg@82
   425
        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   426
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   427
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   428
            <attribute default="**" name="testincludes"/>
franta-hg@82
   429
            <attribute default="" name="testmethods"/>
franta-hg@82
   430
            <element name="customize" optional="true"/>
franta-hg@82
   431
            <sequential>
franta-hg@82
   432
                <property name="run.jvmargs.ide" value=""/>
franta-hg@82
   433
                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
franta-hg@82
   434
                    <batchtest todir="${build.test.results.dir}">
franta-hg@82
   435
                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
franta-hg@82
   436
                            <filename name="@{testincludes}"/>
franta-hg@82
   437
                        </fileset>
franta-hg@82
   438
                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
franta-hg@82
   439
                            <filename name="${test.binarytestincludes}"/>
franta-hg@82
   440
                        </fileset>
franta-hg@82
   441
                    </batchtest>
franta-hg@82
   442
                    <syspropertyset>
franta-hg@82
   443
                        <propertyref prefix="test-sys-prop."/>
franta-hg@82
   444
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@82
   445
                    </syspropertyset>
franta-hg@82
   446
                    <formatter type="brief" usefile="false"/>
franta-hg@82
   447
                    <formatter type="xml"/>
franta-hg@82
   448
                    <jvmarg value="-ea"/>
franta-hg@82
   449
                    <jvmarg line="${run.jvmargs.ide}"/>
franta-hg@82
   450
                    <customize/>
franta-hg@82
   451
                </junit>
franta-hg@82
   452
            </sequential>
franta-hg@82
   453
        </macrodef>
franta-hg@82
   454
    </target>
franta-hg@82
   455
    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
franta-hg@82
   456
    <target if="${testng.available}" name="-init-macrodef-testng">
franta-hg@82
   457
        <macrodef name="testng" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   458
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   459
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   460
            <attribute default="**" name="testincludes"/>
franta-hg@82
   461
            <attribute default="" name="testmethods"/>
franta-hg@82
   462
            <element name="customize" optional="true"/>
franta-hg@82
   463
            <sequential>
franta-hg@82
   464
                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
franta-hg@82
   465
                    <isset property="test.method"/>
franta-hg@82
   466
                </condition>
franta-hg@82
   467
                <union id="test.set">
franta-hg@82
   468
                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
franta-hg@82
   469
                        <filename name="@{testincludes}"/>
franta-hg@82
   470
                    </fileset>
franta-hg@82
   471
                </union>
franta-hg@82
   472
                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
franta-hg@87
   473
                <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="sql-vyuka" testname="TestNG tests" workingDir="${basedir}">
franta-hg@82
   474
                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
franta-hg@82
   475
                    <propertyset>
franta-hg@82
   476
                        <propertyref prefix="test-sys-prop."/>
franta-hg@82
   477
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@82
   478
                    </propertyset>
franta-hg@82
   479
                    <customize/>
franta-hg@82
   480
                </testng>
franta-hg@82
   481
            </sequential>
franta-hg@82
   482
        </macrodef>
franta-hg@82
   483
    </target>
franta-hg@82
   484
    <target name="-init-macrodef-test-impl">
franta-hg@82
   485
        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   486
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   487
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   488
            <attribute default="**" name="testincludes"/>
franta-hg@82
   489
            <attribute default="" name="testmethods"/>
franta-hg@82
   490
            <element implicit="true" name="customize" optional="true"/>
franta-hg@82
   491
            <sequential>
franta-hg@82
   492
                <echo>No tests executed.</echo>
franta-hg@82
   493
            </sequential>
franta-hg@82
   494
        </macrodef>
franta-hg@82
   495
    </target>
franta-hg@82
   496
    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
franta-hg@82
   497
        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   498
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   499
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   500
            <attribute default="**" name="testincludes"/>
franta-hg@82
   501
            <attribute default="" name="testmethods"/>
franta-hg@82
   502
            <element implicit="true" name="customize" optional="true"/>
franta-hg@82
   503
            <sequential>
franta-hg@82
   504
                <webproject2:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
franta-hg@82
   505
                    <customize/>
franta-hg@82
   506
                </webproject2:junit>
franta-hg@82
   507
            </sequential>
franta-hg@82
   508
        </macrodef>
franta-hg@82
   509
    </target>
franta-hg@82
   510
    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
franta-hg@82
   511
        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   512
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   513
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   514
            <attribute default="**" name="testincludes"/>
franta-hg@82
   515
            <attribute default="" name="testmethods"/>
franta-hg@82
   516
            <element implicit="true" name="customize" optional="true"/>
franta-hg@82
   517
            <sequential>
franta-hg@82
   518
                <webproject2:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
franta-hg@82
   519
                    <customize/>
franta-hg@82
   520
                </webproject2:testng>
franta-hg@82
   521
            </sequential>
franta-hg@82
   522
        </macrodef>
franta-hg@82
   523
    </target>
franta-hg@82
   524
    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
franta-hg@82
   525
        <macrodef name="test" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   526
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   527
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   528
            <attribute default="**" name="testincludes"/>
franta-hg@82
   529
            <attribute default="" name="testmethods"/>
franta-hg@82
   530
            <sequential>
franta-hg@82
   531
                <webproject2:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
franta-hg@82
   532
                    <customize>
franta-hg@82
   533
                        <classpath>
franta-hg@82
   534
                            <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
franta-hg@82
   535
                        </classpath>
franta-hg@82
   536
                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@82
   537
                        <jvmarg line="${runmain.jvmargs}"/>
franta-hg@82
   538
                    </customize>
franta-hg@82
   539
                </webproject2:test-impl>
franta-hg@82
   540
            </sequential>
franta-hg@82
   541
        </macrodef>
franta-hg@82
   542
    </target>
franta-hg@82
   543
    <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
franta-hg@82
   544
        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   545
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   546
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   547
            <attribute default="**" name="testincludes"/>
franta-hg@82
   548
            <attribute default="" name="testmethods"/>
franta-hg@82
   549
            <element name="customize" optional="true"/>
franta-hg@82
   550
            <sequential>
franta-hg@82
   551
                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
franta-hg@82
   552
                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
franta-hg@82
   553
                    <syspropertyset>
franta-hg@82
   554
                        <propertyref prefix="test-sys-prop."/>
franta-hg@82
   555
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@82
   556
                    </syspropertyset>
franta-hg@82
   557
                    <formatter type="brief" usefile="false"/>
franta-hg@82
   558
                    <formatter type="xml"/>
franta-hg@82
   559
                    <jvmarg value="-ea"/>
franta-hg@82
   560
                    <jvmarg line="${debug-args-line}"/>
franta-hg@82
   561
                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
franta-hg@82
   562
                    <customize/>
franta-hg@82
   563
                </junit>
franta-hg@82
   564
            </sequential>
franta-hg@82
   565
        </macrodef>
franta-hg@82
   566
    </target>
franta-hg@82
   567
    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
franta-hg@82
   568
        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   569
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   570
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   571
            <attribute default="**" name="testincludes"/>
franta-hg@82
   572
            <attribute default="" name="testmethods"/>
franta-hg@82
   573
            <element name="customize" optional="true"/>
franta-hg@82
   574
            <sequential>
franta-hg@82
   575
                <property name="run.jvmargs.ide" value=""/>
franta-hg@82
   576
                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
franta-hg@82
   577
                    <batchtest todir="${build.test.results.dir}">
franta-hg@82
   578
                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
franta-hg@82
   579
                            <filename name="@{testincludes}"/>
franta-hg@82
   580
                        </fileset>
franta-hg@82
   581
                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
franta-hg@82
   582
                            <filename name="${test.binarytestincludes}"/>
franta-hg@82
   583
                        </fileset>
franta-hg@82
   584
                    </batchtest>
franta-hg@82
   585
                    <syspropertyset>
franta-hg@82
   586
                        <propertyref prefix="test-sys-prop."/>
franta-hg@82
   587
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@82
   588
                    </syspropertyset>
franta-hg@82
   589
                    <formatter type="brief" usefile="false"/>
franta-hg@82
   590
                    <formatter type="xml"/>
franta-hg@82
   591
                    <jvmarg value="-ea"/>
franta-hg@82
   592
                    <jvmarg line="${run.jvmargs.ide}"/>
franta-hg@82
   593
                    <jvmarg line="${debug-args-line}"/>
franta-hg@82
   594
                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
franta-hg@82
   595
                    <customize/>
franta-hg@82
   596
                </junit>
franta-hg@82
   597
            </sequential>
franta-hg@82
   598
        </macrodef>
franta-hg@82
   599
    </target>
franta-hg@82
   600
    <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
franta-hg@82
   601
        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   602
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   603
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   604
            <attribute default="**" name="testincludes"/>
franta-hg@82
   605
            <attribute default="" name="testmethods"/>
franta-hg@82
   606
            <element implicit="true" name="customize" optional="true"/>
franta-hg@82
   607
            <sequential>
franta-hg@82
   608
                <webproject2:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
franta-hg@82
   609
                    <customize/>
franta-hg@82
   610
                </webproject2:junit-debug>
franta-hg@82
   611
            </sequential>
franta-hg@82
   612
        </macrodef>
franta-hg@82
   613
    </target>
franta-hg@82
   614
    <target if="${testng.available}" name="-init-macrodef-testng-debug">
franta-hg@82
   615
        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   616
            <attribute default="${main.class}" name="testClass"/>
franta-hg@82
   617
            <attribute default="" name="testMethod"/>
franta-hg@82
   618
            <element name="customize2" optional="true"/>
franta-hg@82
   619
            <sequential>
franta-hg@82
   620
                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
franta-hg@82
   621
                    <isset property="test.method"/>
franta-hg@82
   622
                </condition>
franta-hg@82
   623
                <condition else="-suitename sql-vyuka -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
franta-hg@82
   624
                    <matches pattern=".*\.xml" string="@{testClass}"/>
franta-hg@82
   625
                </condition>
franta-hg@82
   626
                <delete dir="${build.test.results.dir}" quiet="true"/>
franta-hg@82
   627
                <mkdir dir="${build.test.results.dir}"/>
franta-hg@82
   628
                <webproject1:debug args="${testng.cmd.args}" classname="org.testng.TestNG" classpath="${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
franta-hg@82
   629
                    <customize>
franta-hg@82
   630
                        <customize2/>
franta-hg@82
   631
                        <jvmarg value="-ea"/>
franta-hg@82
   632
                        <arg line="${testng.debug.mode}"/>
franta-hg@82
   633
                        <arg line="-d ${build.test.results.dir}"/>
franta-hg@82
   634
                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
franta-hg@82
   635
                    </customize>
franta-hg@82
   636
                </webproject1:debug>
franta-hg@82
   637
            </sequential>
franta-hg@82
   638
        </macrodef>
franta-hg@82
   639
    </target>
franta-hg@82
   640
    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
franta-hg@82
   641
        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   642
            <attribute default="${main.class}" name="testClass"/>
franta-hg@82
   643
            <attribute default="" name="testMethod"/>
franta-hg@82
   644
            <element implicit="true" name="customize2" optional="true"/>
franta-hg@82
   645
            <sequential>
franta-hg@82
   646
                <webproject2:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
franta-hg@82
   647
                    <customize2/>
franta-hg@82
   648
                </webproject2:testng-debug>
franta-hg@82
   649
            </sequential>
franta-hg@82
   650
        </macrodef>
franta-hg@82
   651
    </target>
franta-hg@82
   652
    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
franta-hg@82
   653
        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   654
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   655
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   656
            <attribute default="**" name="testincludes"/>
franta-hg@82
   657
            <attribute default="" name="testmethods"/>
franta-hg@82
   658
            <attribute default="${main.class}" name="testClass"/>
franta-hg@82
   659
            <attribute default="" name="testMethod"/>
franta-hg@82
   660
            <sequential>
franta-hg@82
   661
                <webproject2:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
franta-hg@82
   662
                    <customize>
franta-hg@82
   663
                        <classpath>
franta-hg@82
   664
                            <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
franta-hg@82
   665
                        </classpath>
franta-hg@82
   666
                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@82
   667
                        <jvmarg line="${runmain.jvmargs}"/>
franta-hg@82
   668
                    </customize>
franta-hg@82
   669
                </webproject2:test-debug-impl>
franta-hg@82
   670
            </sequential>
franta-hg@82
   671
        </macrodef>
franta-hg@82
   672
    </target>
franta-hg@82
   673
    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
franta-hg@82
   674
        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@82
   675
            <attribute default="${includes}" name="includes"/>
franta-hg@82
   676
            <attribute default="${excludes}" name="excludes"/>
franta-hg@82
   677
            <attribute default="**" name="testincludes"/>
franta-hg@82
   678
            <attribute default="" name="testmethods"/>
franta-hg@82
   679
            <attribute default="${main.class}" name="testClass"/>
franta-hg@82
   680
            <attribute default="" name="testMethod"/>
franta-hg@82
   681
            <sequential>
franta-hg@82
   682
                <webproject2:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
franta-hg@82
   683
                    <customize2>
franta-hg@82
   684
                        <syspropertyset>
franta-hg@82
   685
                            <propertyref prefix="test-sys-prop."/>
franta-hg@82
   686
                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@82
   687
                        </syspropertyset>
franta-hg@82
   688
                    </customize2>
franta-hg@82
   689
                </webproject2:testng-debug-impl>
franta-hg@82
   690
            </sequential>
franta-hg@82
   691
        </macrodef>
franta-hg@82
   692
    </target>
franta-hg@82
   693
    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
franta-hg@8
   694
    <target name="-init-macrodef-java">
franta-hg@8
   695
        <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@8
   696
            <attribute default="${main.class}" name="classname"/>
fiki@46
   697
            <attribute default="${debug.classpath}" name="classpath"/>
franta-hg@8
   698
            <element name="customize" optional="true"/>
franta-hg@8
   699
            <sequential>
franta-hg@8
   700
                <java classname="@{classname}" fork="true">
franta-hg@74
   701
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@8
   702
                    <jvmarg line="${runmain.jvmargs}"/>
franta-hg@8
   703
                    <classpath>
fiki@46
   704
                        <path path="@{classpath}:${j2ee.platform.classpath}"/>
franta-hg@8
   705
                    </classpath>
franta-hg@8
   706
                    <syspropertyset>
franta-hg@8
   707
                        <propertyref prefix="run-sys-prop."/>
franta-hg@8
   708
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@8
   709
                    </syspropertyset>
franta-hg@8
   710
                    <customize/>
franta-hg@8
   711
                </java>
franta-hg@8
   712
            </sequential>
franta-hg@8
   713
        </macrodef>
franta-hg@8
   714
    </target>
franta-hg@8
   715
    <target name="-init-macrodef-nbjsdebug">
franta-hg@8
   716
        <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@8
   717
            <attribute default="${client.url}" name="webUrl"/>
franta-hg@8
   718
            <sequential>
franta-hg@8
   719
                <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
franta-hg@8
   720
            </sequential>
franta-hg@8
   721
        </macrodef>
franta-hg@8
   722
    </target>
franta-hg@8
   723
    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
franta-hg@8
   724
        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@8
   725
            <attribute default="${main.class}" name="name"/>
franta-hg@8
   726
            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@8
   727
            <sequential>
franta-hg@8
   728
                <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
franta-hg@8
   729
                    <classpath>
franta-hg@8
   730
                        <path path="@{classpath}"/>
franta-hg@8
   731
                    </classpath>
franta-hg@8
   732
                </nbjpdastart>
franta-hg@8
   733
            </sequential>
franta-hg@8
   734
        </macrodef>
franta-hg@8
   735
        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@8
   736
            <attribute default="${build.classes.dir}" name="dir"/>
franta-hg@8
   737
            <sequential>
franta-hg@8
   738
                <nbjpdareload>
franta-hg@8
   739
                    <fileset dir="@{dir}" includes="${fix.classes}">
franta-hg@8
   740
                        <include name="${fix.includes}*.class"/>
franta-hg@8
   741
                    </fileset>
franta-hg@8
   742
                </nbjpdareload>
franta-hg@8
   743
            </sequential>
franta-hg@8
   744
        </macrodef>
franta-hg@8
   745
        <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@8
   746
            <sequential>
franta-hg@8
   747
                <nbjpdaappreloaded/>
franta-hg@8
   748
            </sequential>
franta-hg@8
   749
        </macrodef>
franta-hg@8
   750
    </target>
franta-hg@8
   751
    <target name="-init-debug-args">
franta-hg@8
   752
        <property name="version-output" value="java version &quot;${ant.java.version}"/>
franta-hg@8
   753
        <condition property="have-jdk-older-than-1.4">
franta-hg@8
   754
            <or>
franta-hg@8
   755
                <contains string="${version-output}" substring="java version &quot;1.0"/>
franta-hg@8
   756
                <contains string="${version-output}" substring="java version &quot;1.1"/>
franta-hg@8
   757
                <contains string="${version-output}" substring="java version &quot;1.2"/>
franta-hg@8
   758
                <contains string="${version-output}" substring="java version &quot;1.3"/>
franta-hg@8
   759
            </or>
franta-hg@8
   760
        </condition>
franta-hg@8
   761
        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
franta-hg@8
   762
            <istrue value="${have-jdk-older-than-1.4}"/>
franta-hg@8
   763
        </condition>
franta-hg@8
   764
        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
franta-hg@8
   765
            <os family="windows"/>
franta-hg@8
   766
        </condition>
franta-hg@8
   767
        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
franta-hg@8
   768
            <isset property="debug.transport"/>
franta-hg@8
   769
        </condition>
franta-hg@8
   770
    </target>
franta-hg@8
   771
    <target depends="-init-debug-args" name="-init-macrodef-debug">
franta-hg@8
   772
        <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@8
   773
            <attribute default="${main.class}" name="classname"/>
franta-hg@8
   774
            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@8
   775
            <attribute default="${application.args.param}" name="args"/>
franta-hg@8
   776
            <element name="customize" optional="true"/>
franta-hg@8
   777
            <sequential>
franta-hg@8
   778
                <java classname="@{classname}" fork="true">
franta-hg@74
   779
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@8
   780
                    <jvmarg line="${debug-args-line}"/>
franta-hg@8
   781
                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
franta-hg@8
   782
                    <jvmarg line="${runmain.jvmargs}"/>
franta-hg@8
   783
                    <classpath>
franta-hg@8
   784
                        <path path="@{classpath}"/>
franta-hg@8
   785
                    </classpath>
franta-hg@8
   786
                    <syspropertyset>
franta-hg@8
   787
                        <propertyref prefix="run-sys-prop."/>
franta-hg@8
   788
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@8
   789
                    </syspropertyset>
franta-hg@8
   790
                    <arg line="@{args}"/>
franta-hg@8
   791
                    <customize/>
franta-hg@8
   792
                </java>
franta-hg@8
   793
            </sequential>
franta-hg@8
   794
        </macrodef>
franta-hg@8
   795
    </target>
franta-hg@8
   796
    <target name="-init-taskdefs">
franta-hg@8
   797
        <fail unless="libs.CopyLibs.classpath">
franta-hg@8
   798
The libs.CopyLibs.classpath property is not set up.
franta-hg@8
   799
This property must point to 
franta-hg@8
   800
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
franta-hg@8
   801
of NetBeans IDE installation and is usually located at 
franta-hg@8
   802
&lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
franta-hg@8
   803
Either open the project in the IDE and make sure CopyLibs library
franta-hg@8
   804
exists or setup the property manually. For example like this:
franta-hg@8
   805
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
franta-hg@8
   806
                </fail>
franta-hg@8
   807
        <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
franta-hg@8
   808
    </target>
franta-hg@79
   809
    <target name="-init-ap-cmdline-properties">
franta-hg@79
   810
        <property name="annotation.processing.enabled" value="true"/>
franta-hg@79
   811
        <property name="annotation.processing.processors.list" value=""/>
franta-hg@79
   812
        <property name="annotation.processing.run.all.processors" value="true"/>
franta-hg@79
   813
        <property name="javac.processorpath" value="${javac.classpath}"/>
franta-hg@79
   814
        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
franta-hg@79
   815
        <condition property="ap.supported.internal" value="true">
franta-hg@79
   816
            <not>
franta-hg@79
   817
                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
franta-hg@79
   818
            </not>
franta-hg@79
   819
        </condition>
franta-hg@79
   820
    </target>
franta-hg@79
   821
    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
franta-hg@79
   822
        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
franta-hg@79
   823
            <isfalse value="${annotation.processing.run.all.processors}"/>
franta-hg@79
   824
        </condition>
franta-hg@79
   825
        <condition else="" property="ap.proc.none.internal" value="-proc:none">
franta-hg@79
   826
            <isfalse value="${annotation.processing.enabled}"/>
franta-hg@79
   827
        </condition>
franta-hg@79
   828
    </target>
franta-hg@79
   829
    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
franta-hg@79
   830
        <property name="ap.cmd.line.internal" value=""/>
franta-hg@79
   831
    </target>
franta-hg@82
   832
    <!--
franta-hg@82
   833
                pre NB7.2 profiling section; consider it deprecated
franta-hg@82
   834
            -->
franta-hg@82
   835
    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
franta-hg@82
   836
    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
franta-hg@79
   837
        <!-- Empty placeholder for easier customization. -->
franta-hg@79
   838
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@79
   839
    </target>
franta-hg@82
   840
    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
franta-hg@79
   841
        <!-- Empty placeholder for easier customization. -->
franta-hg@79
   842
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@79
   843
    </target>
franta-hg@82
   844
    <target depends="-profile-pre-init, init, -profile-post-init" if="profiler.info.jvmargs.agent" name="-profile-init-check">
franta-hg@79
   845
        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
franta-hg@79
   846
        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
franta-hg@79
   847
    </target>
franta-hg@82
   848
    <!--
franta-hg@82
   849
                end of pre NB7.2 profiling section
franta-hg@82
   850
            -->
franta-hg@82
   851
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
franta-hg@8
   852
    <!--
franta-hg@8
   853
                COMPILATION SECTION
franta-hg@8
   854
            -->
franta-hg@15
   855
    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps">
fiki@46
   856
        <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="jar">
fiki@46
   857
            <property name="deploy.on.save" value="false"/>
fiki@46
   858
        </ant>
franta-hg@15
   859
    </target>
franta-hg@15
   860
    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
fiki@46
   861
        <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="jar">
fiki@46
   862
            <property name="deploy.on.save" value="false"/>
fiki@46
   863
        </ant>
franta-hg@15
   864
    </target>
franta-hg@8
   865
    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
franta-hg@8
   866
    <target depends="init,deps-jar" name="-pre-pre-compile">
franta-hg@8
   867
        <mkdir dir="${build.classes.dir}"/>
franta-hg@8
   868
    </target>
franta-hg@8
   869
    <target name="-pre-compile">
franta-hg@8
   870
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
   871
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
   872
    </target>
franta-hg@8
   873
    <target name="-copy-webdir">
franta-hg@8
   874
        <copy todir="${build.web.dir}">
franta-hg@8
   875
            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
franta-hg@8
   876
        </copy>
franta-hg@8
   877
        <copy todir="${build.web.dir}/WEB-INF">
franta-hg@8
   878
            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
franta-hg@8
   879
        </copy>
franta-hg@8
   880
    </target>
fiki@46
   881
    <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">
fiki@46
   882
        <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
franta-hg@8
   883
        <copy todir="${build.classes.dir}">
franta-hg@8
   884
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@8
   885
        </copy>
franta-hg@8
   886
    </target>
franta-hg@8
   887
    <target if="has.custom.manifest" name="-copy-manifest">
franta-hg@8
   888
        <mkdir dir="${build.meta.inf.dir}"/>
franta-hg@8
   889
        <copy todir="${build.meta.inf.dir}">
franta-hg@8
   890
            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
franta-hg@8
   891
        </copy>
franta-hg@8
   892
    </target>
franta-hg@8
   893
    <target if="has.persistence.xml" name="-copy-persistence-xml">
franta-hg@8
   894
        <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
franta-hg@8
   895
        <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
franta-hg@82
   896
            <fileset dir="${persistence.xml.dir}" includes="persistence.xml orm.xml"/>
franta-hg@8
   897
        </copy>
franta-hg@8
   898
    </target>
franta-hg@8
   899
    <target name="-post-compile">
franta-hg@8
   900
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
   901
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
   902
    </target>
franta-hg@8
   903
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
franta-hg@8
   904
    <target name="-pre-compile-single">
franta-hg@8
   905
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
   906
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
   907
    </target>
franta-hg@8
   908
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
franta-hg@8
   909
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
fiki@46
   910
        <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
franta-hg@8
   911
        <copy todir="${build.classes.dir}">
franta-hg@8
   912
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@8
   913
        </copy>
franta-hg@8
   914
    </target>
franta-hg@8
   915
    <target name="-post-compile-single">
franta-hg@8
   916
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
   917
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
   918
    </target>
franta-hg@8
   919
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
franta-hg@79
   920
    <property name="jspc.schemas" value="/resources/schemas/"/>
franta-hg@79
   921
    <property name="jspc.dtds" value="/resources/dtds/"/>
franta-hg@8
   922
    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
franta-hg@8
   923
        <mkdir dir="${build.generated.dir}/src"/>
franta-hg@8
   924
        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
franta-hg@8
   925
            <arg value="-uriroot"/>
franta-hg@8
   926
            <arg file="${basedir}/${build.web.dir}"/>
franta-hg@8
   927
            <arg value="-d"/>
franta-hg@8
   928
            <arg file="${basedir}/${build.generated.dir}/src"/>
franta-hg@8
   929
            <arg value="-die1"/>
franta-hg@79
   930
            <arg value="-schemas ${jspc.schemas}"/>
franta-hg@79
   931
            <arg value="-dtds ${jspc.dtds}"/>
franta-hg@8
   932
            <arg value="-compilerSourceVM ${javac.source}"/>
franta-hg@8
   933
            <arg value="-compilerTargetVM ${javac.target}"/>
franta-hg@8
   934
            <arg value="-javaEncoding ${source.encoding}"/>
franta-hg@79
   935
            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
franta-hg@79
   936
            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
franta-hg@8
   937
        </java>
franta-hg@8
   938
        <mkdir dir="${build.generated.dir}/classes"/>
franta-hg@79
   939
        <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@8
   940
    </target>
franta-hg@8
   941
    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
franta-hg@8
   942
        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
franta-hg@8
   943
        <mkdir dir="${build.generated.dir}/src"/>
franta-hg@8
   944
        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
franta-hg@8
   945
            <arg value="-uriroot"/>
franta-hg@8
   946
            <arg file="${basedir}/${build.web.dir}"/>
franta-hg@8
   947
            <arg value="-d"/>
franta-hg@8
   948
            <arg file="${basedir}/${build.generated.dir}/src"/>
franta-hg@8
   949
            <arg value="-die1"/>
franta-hg@79
   950
            <arg value="-schemas ${jspc.schemas}"/>
franta-hg@79
   951
            <arg value="-dtds ${jspc.dtds}"/>
franta-hg@79
   952
            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
franta-hg@8
   953
            <arg value="-jspc.files"/>
franta-hg@8
   954
            <arg path="${jsp.includes}"/>
franta-hg@8
   955
            <arg value="-compilerSourceVM ${javac.source}"/>
franta-hg@8
   956
            <arg value="-compilerTargetVM ${javac.target}"/>
franta-hg@8
   957
            <arg value="-javaEncoding ${source.encoding}"/>
franta-hg@79
   958
            <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
franta-hg@8
   959
        </java>
franta-hg@8
   960
        <mkdir dir="${build.generated.dir}/classes"/>
franta-hg@79
   961
        <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@8
   962
            <customize>
franta-hg@8
   963
                <patternset includes="${javac.jsp.includes}"/>
franta-hg@8
   964
            </customize>
franta-hg@8
   965
        </webproject2:javac>
franta-hg@8
   966
    </target>
franta-hg@8
   967
    <target name="compile-single-jsp">
franta-hg@8
   968
        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
franta-hg@8
   969
        <antcall target="-do-compile-single-jsp"/>
franta-hg@8
   970
    </target>
franta-hg@8
   971
    <!--
franta-hg@8
   972
                DIST BUILDING SECTION
franta-hg@8
   973
            -->
franta-hg@8
   974
    <target name="-pre-dist">
franta-hg@8
   975
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
   976
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
   977
    </target>
franta-hg@8
   978
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
franta-hg@8
   979
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@8
   980
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@8
   981
        <jar compress="${jar.compress}" jarfile="${dist.war}">
franta-hg@87
   982
            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/>
franta-hg@8
   983
        </jar>
franta-hg@8
   984
    </target>
franta-hg@8
   985
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
franta-hg@8
   986
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@8
   987
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@8
   988
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
franta-hg@87
   989
            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/>
franta-hg@8
   990
        </jar>
franta-hg@8
   991
    </target>
franta-hg@8
   992
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
franta-hg@8
   993
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@8
   994
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@8
   995
        <jar compress="${jar.compress}" jarfile="${dist.war}">
franta-hg@87
   996
            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/>
franta-hg@8
   997
        </jar>
franta-hg@8
   998
    </target>
franta-hg@8
   999
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
franta-hg@8
  1000
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@8
  1001
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@8
  1002
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
franta-hg@87
  1003
            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/>
franta-hg@8
  1004
        </jar>
franta-hg@8
  1005
    </target>
franta-hg@8
  1006
    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
franta-hg@8
  1007
    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
franta-hg@74
  1008
        <copyfiles files="${reference.SuperDAO.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
franta-hg@8
  1009
        <mkdir dir="${build.web.dir}/META-INF"/>
franta-hg@74
  1010
        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
franta-hg@8
  1011
    </target>
franta-hg@15
  1012
    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
franta-hg@15
  1013
        <copyfiles files="${reference.SuperDAO.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
franta-hg@15
  1014
    </target>
franta-hg@74
  1015
    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
franta-hg@74
  1016
        <delete dir="${build.web.dir}/WEB-INF/lib"/>
franta-hg@74
  1017
    </target>
franta-hg@74
  1018
    <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@8
  1019
        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
franta-hg@8
  1020
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@8
  1021
        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
franta-hg@87
  1022
            <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/>
franta-hg@8
  1023
        </jar>
franta-hg@8
  1024
    </target>
franta-hg@8
  1025
    <target name="-post-dist">
franta-hg@8
  1026
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1027
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
  1028
    </target>
franta-hg@8
  1029
    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
franta-hg@74
  1030
    <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@8
  1031
    <!--
franta-hg@8
  1032
                EXECUTION SECTION
franta-hg@8
  1033
            -->
franta-hg@8
  1034
    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
franta-hg@8
  1035
    <target name="-pre-run-deploy">
franta-hg@8
  1036
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1037
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
  1038
    </target>
franta-hg@8
  1039
    <target name="-post-run-deploy">
franta-hg@8
  1040
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1041
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
  1042
    </target>
franta-hg@8
  1043
    <target name="-pre-nbmodule-run-deploy">
franta-hg@8
  1044
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1045
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
franta-hg@8
  1046
    </target>
franta-hg@8
  1047
    <target name="-post-nbmodule-run-deploy">
franta-hg@8
  1048
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1049
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
franta-hg@8
  1050
    </target>
franta-hg@8
  1051
    <target name="-run-deploy-am">
franta-hg@8
  1052
        <!-- Task to deploy to the Access Manager runtime. -->
franta-hg@8
  1053
    </target>
franta-hg@79
  1054
    <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@8
  1055
    <target if="netbeans.home" name="-run-deploy-nb">
franta-hg@8
  1056
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
franta-hg@8
  1057
    </target>
franta-hg@8
  1058
    <target name="-init-deploy-ant" unless="netbeans.home">
franta-hg@8
  1059
        <property name="deploy.ant.archive" value="${dist.war}"/>
franta-hg@8
  1060
        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
franta-hg@8
  1061
        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
franta-hg@8
  1062
        <property name="deploy.ant.enabled" value="true"/>
franta-hg@8
  1063
    </target>
franta-hg@8
  1064
    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
franta-hg@8
  1065
    <target if="netbeans.home" name="-run-undeploy-nb">
franta-hg@8
  1066
        <fail message="Undeploy is not supported from within the IDE"/>
franta-hg@8
  1067
    </target>
franta-hg@8
  1068
    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
franta-hg@8
  1069
        <nbverify file="${dist.war}"/>
franta-hg@8
  1070
    </target>
franta-hg@87
  1071
    <target depends="run-deploy,-init-display-browser,-display-browser-nb-old,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
franta-hg@8
  1072
    <target if="do.display.browser" name="-init-display-browser">
franta-hg@87
  1073
        <condition property="do.display.browser.nb.old">
franta-hg@87
  1074
            <and>
franta-hg@87
  1075
                <isset property="netbeans.home"/>
franta-hg@87
  1076
                <not>
franta-hg@87
  1077
                    <isset property="browser.context"/>
franta-hg@87
  1078
                </not>
franta-hg@87
  1079
            </and>
franta-hg@87
  1080
        </condition>
franta-hg@8
  1081
        <condition property="do.display.browser.nb">
franta-hg@87
  1082
            <and>
franta-hg@87
  1083
                <isset property="netbeans.home"/>
franta-hg@87
  1084
                <isset property="browser.context"/>
franta-hg@87
  1085
            </and>
franta-hg@8
  1086
        </condition>
franta-hg@8
  1087
        <condition property="do.display.browser.cl">
franta-hg@8
  1088
            <isset property="deploy.ant.enabled"/>
franta-hg@8
  1089
        </condition>
franta-hg@8
  1090
    </target>
franta-hg@87
  1091
    <target if="do.display.browser.nb.old" name="-display-browser-nb-old">
franta-hg@87
  1092
        <nbbrowse url="${client.url}"/>
franta-hg@87
  1093
    </target>
franta-hg@8
  1094
    <target if="do.display.browser.nb" name="-display-browser-nb">
franta-hg@87
  1095
        <nbbrowse context="${browser.context}" url="${client.url}" urlPath="${client.urlPart}"/>
franta-hg@8
  1096
    </target>
franta-hg@8
  1097
    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
franta-hg@8
  1098
        <condition property="browser" value="rundll32">
franta-hg@8
  1099
            <os family="windows"/>
franta-hg@8
  1100
        </condition>
franta-hg@8
  1101
        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
franta-hg@8
  1102
            <os family="windows"/>
franta-hg@8
  1103
        </condition>
franta-hg@8
  1104
        <condition property="browser" value="/usr/bin/open">
franta-hg@8
  1105
            <os family="mac"/>
franta-hg@8
  1106
        </condition>
franta-hg@8
  1107
        <property environment="env"/>
franta-hg@8
  1108
        <condition property="browser" value="${env.BROWSER}">
franta-hg@8
  1109
            <isset property="env.BROWSER"/>
franta-hg@8
  1110
        </condition>
franta-hg@8
  1111
        <condition property="browser" value="/usr/bin/firefox">
franta-hg@8
  1112
            <available file="/usr/bin/firefox"/>
franta-hg@8
  1113
        </condition>
franta-hg@8
  1114
        <condition property="browser" value="/usr/local/firefox/firefox">
franta-hg@8
  1115
            <available file="/usr/local/firefox/firefox"/>
franta-hg@8
  1116
        </condition>
franta-hg@8
  1117
        <condition property="browser" value="/usr/bin/mozilla">
franta-hg@8
  1118
            <available file="/usr/bin/mozilla"/>
franta-hg@8
  1119
        </condition>
franta-hg@8
  1120
        <condition property="browser" value="/usr/local/mozilla/mozilla">
franta-hg@8
  1121
            <available file="/usr/local/mozilla/mozilla"/>
franta-hg@8
  1122
        </condition>
franta-hg@8
  1123
        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
franta-hg@8
  1124
            <available file="/usr/sfw/lib/firefox/firefox"/>
franta-hg@8
  1125
        </condition>
franta-hg@8
  1126
        <condition property="browser" value="/opt/csw/bin/firefox">
franta-hg@8
  1127
            <available file="/opt/csw/bin/firefox"/>
franta-hg@8
  1128
        </condition>
franta-hg@8
  1129
        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
franta-hg@8
  1130
            <available file="/usr/sfw/lib/mozilla/mozilla"/>
franta-hg@8
  1131
        </condition>
franta-hg@8
  1132
        <condition property="browser" value="/opt/csw/bin/mozilla">
franta-hg@8
  1133
            <available file="/opt/csw/bin/mozilla"/>
franta-hg@8
  1134
        </condition>
franta-hg@8
  1135
    </target>
franta-hg@8
  1136
    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
franta-hg@8
  1137
        <fail unless="browser">
franta-hg@8
  1138
                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
franta-hg@8
  1139
                </fail>
franta-hg@8
  1140
        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
franta-hg@8
  1141
        <echo>Launching ${browse.url}</echo>
franta-hg@8
  1142
        <exec executable="${browser}" spawn="true">
franta-hg@8
  1143
            <arg line="${browser.args} ${browse.url}"/>
franta-hg@8
  1144
        </exec>
franta-hg@8
  1145
    </target>
franta-hg@8
  1146
    <target depends="init,-init-cos,compile-single" name="run-main">
franta-hg@8
  1147
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
franta-hg@8
  1148
        <webproject1:java classname="${run.class}"/>
franta-hg@8
  1149
    </target>
fiki@46
  1150
    <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
fiki@46
  1151
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
fiki@46
  1152
        <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
fiki@46
  1153
    </target>
franta-hg@79
  1154
    <target depends="init" if="netbeans.home" name="-do-update-breakpoints">
franta-hg@79
  1155
        <webproject1:nbjpdaappreloaded/>
franta-hg@79
  1156
    </target>
franta-hg@8
  1157
    <!--
franta-hg@8
  1158
                DEBUGGING SECTION
franta-hg@8
  1159
            -->
franta-hg@74
  1160
    <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">
fiki@46
  1161
        <nbstartserver debugmode="true"/>
franta-hg@8
  1162
        <antcall target="connect-debugger"/>
fiki@46
  1163
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
franta-hg@87
  1164
        <antcall target="debug-display-browser-old"/>
franta-hg@8
  1165
        <antcall target="debug-display-browser"/>
franta-hg@8
  1166
        <antcall target="connect-client-debugger"/>
franta-hg@8
  1167
    </target>
franta-hg@8
  1168
    <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
franta-hg@82
  1169
        <condition property="listeningcp" value="sourcepath">
franta-hg@82
  1170
            <istrue value="${j2ee.compile.on.save}"/>
franta-hg@82
  1171
        </condition>
franta-hg@82
  1172
        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" listeningcp="${listeningcp}" name="${name}" transport="${jpda.transport}">
franta-hg@8
  1173
            <classpath>
franta-hg@8
  1174
                <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
franta-hg@8
  1175
            </classpath>
franta-hg@8
  1176
            <sourcepath>
franta-hg@8
  1177
                <path path="${web.docbase.dir}"/>
franta-hg@8
  1178
            </sourcepath>
franta-hg@8
  1179
        </nbjpdaconnect>
franta-hg@8
  1180
    </target>
franta-hg@87
  1181
    <target if="do.display.browser.debug.old" name="debug-display-browser-old">
franta-hg@87
  1182
        <nbbrowse url="${client.url}"/>
franta-hg@87
  1183
    </target>
franta-hg@8
  1184
    <target if="do.display.browser.debug" name="debug-display-browser">
franta-hg@87
  1185
        <nbbrowse context="${browser.context}" url="${client.url}" urlPath="${client.urlPart}"/>
franta-hg@8
  1186
    </target>
franta-hg@8
  1187
    <target if="do.debug.client" name="connect-client-debugger">
franta-hg@8
  1188
        <webproject1:nbjsdebugstart webUrl="${client.url}"/>
franta-hg@8
  1189
    </target>
fiki@46
  1190
    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
fiki@46
  1191
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
fiki@46
  1192
        <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
fiki@46
  1193
    </target>
fiki@46
  1194
    <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@8
  1195
    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
fiki@46
  1196
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
fiki@46
  1197
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
fiki@46
  1198
    </target>
franta-hg@8
  1199
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
franta-hg@8
  1200
        <webproject1:nbjpdastart name="${debug.class}"/>
franta-hg@8
  1201
    </target>
franta-hg@8
  1202
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
franta-hg@8
  1203
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
franta-hg@8
  1204
        <webproject1:debug classname="${debug.class}"/>
franta-hg@8
  1205
    </target>
franta-hg@8
  1206
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
franta-hg@8
  1207
    <target depends="init" name="-pre-debug-fix">
franta-hg@8
  1208
        <fail unless="fix.includes">Must set fix.includes</fail>
franta-hg@8
  1209
        <property name="javac.includes" value="${fix.includes}.java"/>
franta-hg@8
  1210
    </target>
franta-hg@8
  1211
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
franta-hg@8
  1212
        <webproject1:nbjpdareload/>
franta-hg@8
  1213
    </target>
franta-hg@8
  1214
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
franta-hg@8
  1215
    <!--
franta-hg@79
  1216
            =================
franta-hg@79
  1217
            PROFILING SECTION
franta-hg@79
  1218
            =================
franta-hg@79
  1219
            -->
franta-hg@82
  1220
    <!--
franta-hg@82
  1221
                pre NB7.2 profiling section; consider it deprecated
franta-hg@82
  1222
            -->
franta-hg@82
  1223
    <target description="Profile a J2EE project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
franta-hg@79
  1224
        <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
franta-hg@79
  1225
            <isset property="profiler.info.jvmargs.extra"/>
franta-hg@79
  1226
        </condition>
franta-hg@79
  1227
        <antcall target="${profiler.startserver.target}"/>
franta-hg@79
  1228
        <antcall target="run"/>
franta-hg@82
  1229
        <antcall target="-profile-start-loadgen"/>
franta-hg@79
  1230
    </target>
franta-hg@82
  1231
    <target if="profiler.info.jvmargs.agent" name="start-profiled-server">
franta-hg@79
  1232
        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
franta-hg@79
  1233
            <jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@79
  1234
            <jvmarg value="${profiler.j2ee.agentID}"/>
franta-hg@79
  1235
        </nbstartprofiledserver>
franta-hg@79
  1236
    </target>
franta-hg@82
  1237
    <target if="profiler.info.jvmargs.agent" name="start-profiled-server-extraargs">
franta-hg@79
  1238
        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
franta-hg@79
  1239
            <jvmarg value="${profiler.info.jvmargs.extra}"/>
franta-hg@79
  1240
            <jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@79
  1241
            <jvmarg value="${profiler.j2ee.agentID}"/>
franta-hg@79
  1242
        </nbstartprofiledserver>
franta-hg@79
  1243
    </target>
franta-hg@82
  1244
    <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
franta-hg@82
  1245
        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
franta-hg@82
  1246
        <nbprofiledirect>
franta-hg@82
  1247
            <classpath>
franta-hg@82
  1248
                <path path="${run.test.classpath}"/>
franta-hg@82
  1249
                <path path="${j2ee.platform.classpath}"/>
franta-hg@82
  1250
            </classpath>
franta-hg@82
  1251
        </nbprofiledirect>
franta-hg@82
  1252
        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
franta-hg@82
  1253
            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
franta-hg@82
  1254
            <jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@82
  1255
            <jvmarg line="${profiler.info.jvmargs}"/>
franta-hg@82
  1256
            <test name="${profile.class}"/>
franta-hg@82
  1257
            <classpath>
franta-hg@82
  1258
                <path path="${run.test.classpath}"/>
franta-hg@82
  1259
                <path path="${j2ee.platform.classpath}"/>
franta-hg@82
  1260
            </classpath>
franta-hg@82
  1261
            <syspropertyset>
franta-hg@82
  1262
                <propertyref prefix="test-sys-prop."/>
franta-hg@82
  1263
                <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@82
  1264
            </syspropertyset>
franta-hg@82
  1265
            <formatter type="brief" usefile="false"/>
franta-hg@82
  1266
            <formatter type="xml"/>
franta-hg@82
  1267
        </junit>
franta-hg@82
  1268
    </target>
franta-hg@82
  1269
    <target if="netbeans.home" name="-profile-check">
franta-hg@82
  1270
        <condition property="profiler.configured">
franta-hg@82
  1271
            <or>
franta-hg@82
  1272
                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
franta-hg@82
  1273
                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
franta-hg@82
  1274
            </or>
franta-hg@82
  1275
        </condition>
franta-hg@82
  1276
    </target>
franta-hg@82
  1277
    <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" name="-do-profile">
franta-hg@82
  1278
        <startprofiler/>
franta-hg@82
  1279
        <nbstartserver profilemode="true"/>
franta-hg@82
  1280
        <nbdeploy clientUrlPart="${client.urlPart}" forceRedeploy="true" profilemode="true"/>
franta-hg@87
  1281
        <antcall target="debug-display-browser-old"/>
franta-hg@82
  1282
        <antcall target="debug-display-browser"/>
franta-hg@82
  1283
        <antcall target="-profile-start-loadgen"/>
franta-hg@82
  1284
    </target>
franta-hg@82
  1285
    <target depends="-profile-check,-profile-pre72" description="Profile a J2EE project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
franta-hg@82
  1286
        <antcall target="-do-profile"/>
franta-hg@82
  1287
    </target>
franta-hg@82
  1288
    <target depends="-profile-test-single-pre72" name="profile-test-single"/>
franta-hg@82
  1289
    <target depends="-profile-check" if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs.agent">
franta-hg@82
  1290
        <startprofiler/>
franta-hg@82
  1291
        <antcall target="test-single"/>
franta-hg@82
  1292
    </target>
franta-hg@82
  1293
    <target if="profiler.loadgen.path" name="-profile-start-loadgen">
franta-hg@79
  1294
        <loadgenstart path="${profiler.loadgen.path}"/>
franta-hg@79
  1295
    </target>
franta-hg@79
  1296
    <!--
franta-hg@8
  1297
                JAVADOC SECTION
franta-hg@8
  1298
            -->
franta-hg@79
  1299
    <target depends="init" if="have.sources" name="javadoc-build">
franta-hg@8
  1300
        <mkdir dir="${dist.javadoc.dir}"/>
franta-hg@8
  1301
        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
franta-hg@8
  1302
            <classpath>
franta-hg@8
  1303
                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
franta-hg@8
  1304
            </classpath>
franta-hg@8
  1305
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
franta-hg@8
  1306
                <filename name="**/*.java"/>
franta-hg@8
  1307
            </fileset>
fiki@46
  1308
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
fiki@46
  1309
                <include name="**/*.java"/>
fiki@46
  1310
            </fileset>
franta-hg@8
  1311
        </javadoc>
franta-hg@79
  1312
        <copy todir="${dist.javadoc.dir}">
franta-hg@79
  1313
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
franta-hg@79
  1314
                <filename name="**/doc-files/**"/>
franta-hg@79
  1315
            </fileset>
franta-hg@79
  1316
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
franta-hg@79
  1317
                <include name="**/doc-files/**"/>
franta-hg@79
  1318
            </fileset>
franta-hg@79
  1319
        </copy>
franta-hg@8
  1320
    </target>
franta-hg@8
  1321
    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
franta-hg@8
  1322
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
franta-hg@8
  1323
    </target>
franta-hg@8
  1324
    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
franta-hg@8
  1325
    <!--
franta-hg@8
  1326
                
franta-hg@82
  1327
                TEST COMPILATION SECTION
franta-hg@8
  1328
            -->
franta-hg@8
  1329
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
franta-hg@8
  1330
        <mkdir dir="${build.test.classes.dir}"/>
franta-hg@74
  1331
        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
franta-hg@8
  1332
    </target>
franta-hg@8
  1333
    <target name="-pre-compile-test">
franta-hg@8
  1334
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1335
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
  1336
    </target>
franta-hg@8
  1337
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
franta-hg@74
  1338
        <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@8
  1339
        <copy todir="${build.test.classes.dir}">
franta-hg@8
  1340
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@8
  1341
        </copy>
franta-hg@8
  1342
    </target>
franta-hg@8
  1343
    <target name="-post-compile-test">
franta-hg@8
  1344
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1345
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
  1346
    </target>
franta-hg@8
  1347
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
franta-hg@8
  1348
    <target name="-pre-compile-test-single">
franta-hg@8
  1349
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1350
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
  1351
    </target>
franta-hg@8
  1352
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
franta-hg@8
  1353
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
franta-hg@74
  1354
        <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@8
  1355
        <copy todir="${build.test.classes.dir}">
franta-hg@8
  1356
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@8
  1357
        </copy>
franta-hg@8
  1358
    </target>
franta-hg@8
  1359
    <target name="-post-compile-test-single">
franta-hg@8
  1360
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1361
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
  1362
    </target>
franta-hg@8
  1363
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
franta-hg@8
  1364
    <!--
franta-hg@8
  1365
                
franta-hg@82
  1366
                TEST EXECUTION SECTION
franta-hg@8
  1367
            -->
franta-hg@8
  1368
    <target depends="init" if="have.tests" name="-pre-test-run">
franta-hg@8
  1369
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@8
  1370
    </target>
franta-hg@8
  1371
    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
franta-hg@87
  1372
        <webproject2:test includes="${includes}" testincludes="**/*Test.java"/>
franta-hg@8
  1373
    </target>
franta-hg@8
  1374
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
fiki@46
  1375
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@8
  1376
    </target>
franta-hg@8
  1377
    <target depends="init" if="have.tests" name="test-report"/>
franta-hg@8
  1378
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
franta-hg@8
  1379
    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
franta-hg@8
  1380
    <target depends="init" if="have.tests" name="-pre-test-run-single">
franta-hg@8
  1381
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@8
  1382
    </target>
franta-hg@8
  1383
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
franta-hg@8
  1384
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
franta-hg@82
  1385
        <webproject2:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
franta-hg@8
  1386
    </target>
franta-hg@8
  1387
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
fiki@46
  1388
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@8
  1389
    </target>
franta-hg@8
  1390
    <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@82
  1391
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
franta-hg@82
  1392
        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
franta-hg@82
  1393
        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
franta-hg@82
  1394
        <webproject2:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
franta-hg@82
  1395
    </target>
franta-hg@82
  1396
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
franta-hg@82
  1397
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@82
  1398
    </target>
franta-hg@82
  1399
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
franta-hg@8
  1400
    <!--
franta-hg@8
  1401
                
franta-hg@82
  1402
                TEST DEBUGGING SECTION
franta-hg@8
  1403
            -->
franta-hg@82
  1404
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
franta-hg@8
  1405
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
franta-hg@82
  1406
        <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
franta-hg@82
  1407
    </target>
franta-hg@82
  1408
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
franta-hg@82
  1409
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
franta-hg@82
  1410
        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
franta-hg@82
  1411
        <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
franta-hg@8
  1412
    </target>
franta-hg@8
  1413
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
franta-hg@8
  1414
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
franta-hg@8
  1415
    </target>
franta-hg@8
  1416
    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
franta-hg@82
  1417
    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
franta-hg@8
  1418
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
franta-hg@8
  1419
        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
franta-hg@8
  1420
    </target>
franta-hg@8
  1421
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
franta-hg@8
  1422
    <!--
franta-hg@8
  1423
                
franta-hg@8
  1424
                CLEANUP SECTION
franta-hg@8
  1425
            -->
franta-hg@79
  1426
    <target depends="init" name="deps-clean" unless="no.deps">
franta-hg@15
  1427
        <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="clean"/>
franta-hg@15
  1428
    </target>
franta-hg@8
  1429
    <target depends="init" name="do-clean">
franta-hg@8
  1430
        <condition property="build.dir.to.clean" value="${build.web.dir}">
franta-hg@8
  1431
            <isset property="dist.ear.dir"/>
franta-hg@8
  1432
        </condition>
franta-hg@8
  1433
        <property name="build.dir.to.clean" value="${build.web.dir}"/>
franta-hg@8
  1434
        <delete includeEmptyDirs="true" quiet="true">
franta-hg@8
  1435
            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
franta-hg@8
  1436
        </delete>
franta-hg@8
  1437
        <delete dir="${build.dir}"/>
franta-hg@8
  1438
        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
franta-hg@8
  1439
        <delete dir="${dist.dir}"/>
franta-hg@8
  1440
    </target>
franta-hg@8
  1441
    <target depends="do-clean" if="status.clean-failed" name="check-clean">
franta-hg@8
  1442
        <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
franta-hg@8
  1443
        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
franta-hg@8
  1444
    </target>
franta-hg@8
  1445
    <target depends="init" if="netbeans.home" name="undeploy-clean">
franta-hg@8
  1446
        <nbundeploy failOnError="false" startServer="false"/>
franta-hg@8
  1447
    </target>
franta-hg@8
  1448
    <target name="-post-clean">
franta-hg@8
  1449
        <!-- Empty placeholder for easier customization. -->
franta-hg@8
  1450
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@8
  1451
    </target>
franta-hg@8
  1452
    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
franta-hg@8
  1453
    <target depends="clean" description="Clean build products." name="clean-ear"/>
franta-hg@8
  1454
</project>