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