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