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