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