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