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