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