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