samples/hellowithsubclassing/nbproject/build-impl.xml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 11 Nov 2019 13:17:34 +0100
changeset 413 f11943a373a7
parent 70 cba5d0a9e9f0
permissions -rw-r--r--
Updating to projects from NetBeans 11.2
jtulach@70
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@70
     2
<!--
jtulach@70
     3
*** GENERATED FROM project.xml - DO NOT EDIT  ***
jtulach@70
     4
***         EDIT ../build.xml INSTEAD         ***
jtulach@70
     5
jtulach@70
     6
For the purpose of easier reading the script
jtulach@70
     7
is divided into following sections:
jtulach@70
     8
jtulach@70
     9
  - initialization
jtulach@70
    10
  - compilation
jtulach@70
    11
  - jar
jtulach@70
    12
  - execution
jtulach@70
    13
  - debugging
jtulach@70
    14
  - javadoc
jaroslav@413
    15
  - test compilation
jaroslav@413
    16
  - test execution
jaroslav@413
    17
  - test debugging
jtulach@70
    18
  - applet
jtulach@70
    19
  - cleanup
jtulach@70
    20
jtulach@70
    21
        -->
jaroslav@413
    22
<project xmlns:if="ant:if" 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" xmlns:unless="ant:unless" basedir=".." default="default" name="hellowithsubclassing-impl">
jaroslav@413
    23
    <fail message="Please build using Ant 1.8.0 or higher.">
jaroslav@413
    24
        <condition>
jaroslav@413
    25
            <not>
jaroslav@413
    26
                <antversion atleast="1.8.0"/>
jaroslav@413
    27
            </not>
jaroslav@413
    28
        </condition>
jaroslav@413
    29
    </fail>
jtulach@70
    30
    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
jtulach@70
    31
    <!-- 
jtulach@70
    32
                ======================
jtulach@70
    33
                INITIALIZATION SECTION 
jtulach@70
    34
                ======================
jtulach@70
    35
            -->
jtulach@70
    36
    <target name="-pre-init">
jtulach@70
    37
        <!-- Empty placeholder for easier customization. -->
jtulach@70
    38
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
    39
    </target>
jtulach@70
    40
    <target depends="-pre-init" name="-init-private">
jtulach@70
    41
        <property file="nbproject/private/config.properties"/>
jtulach@70
    42
        <property file="nbproject/private/configs/${config}.properties"/>
jtulach@70
    43
        <property file="nbproject/private/private.properties"/>
jtulach@70
    44
    </target>
jtulach@70
    45
    <target depends="-pre-init,-init-private" name="-init-user">
jtulach@70
    46
        <property file="${user.properties.file}"/>
jtulach@70
    47
        <!-- The two properties below are usually overridden -->
jtulach@70
    48
        <!-- by the active platform. Just a fallback. -->
jaroslav@413
    49
        <property name="default.javac.source" value="1.6"/>
jaroslav@413
    50
        <property name="default.javac.target" value="1.6"/>
jtulach@70
    51
    </target>
jtulach@70
    52
    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
jtulach@70
    53
        <property file="nbproject/configs/${config}.properties"/>
jtulach@70
    54
        <property file="nbproject/project.properties"/>
jtulach@70
    55
    </target>
jaroslav@413
    56
    <target name="-init-modules-supported">
jaroslav@413
    57
        <condition property="modules.supported.internal" value="true">
jaroslav@413
    58
            <not>
jaroslav@413
    59
                <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
jaroslav@413
    60
            </not>
jaroslav@413
    61
        </condition>
jaroslav@413
    62
    </target>
jaroslav@413
    63
    <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
jaroslav@413
    64
        <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
    65
            <attribute name="property"/>
jaroslav@413
    66
            <attribute name="sourcepath"/>
jaroslav@413
    67
            <sequential>
jaroslav@413
    68
                <loadresource property="@{property}" quiet="true">
jaroslav@413
    69
                    <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
jaroslav@413
    70
                    <filterchain>
jaroslav@413
    71
                        <stripjavacomments/>
jaroslav@413
    72
                        <linecontainsregexp>
jaroslav@413
    73
                            <regexp pattern="module .* \{"/>
jaroslav@413
    74
                        </linecontainsregexp>
jaroslav@413
    75
                        <tokenfilter>
jaroslav@413
    76
                            <linetokenizer/>
jaroslav@413
    77
                            <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
jaroslav@413
    78
                        </tokenfilter>
jaroslav@413
    79
                        <striplinebreaks/>
jaroslav@413
    80
                    </filterchain>
jaroslav@413
    81
                </loadresource>
jaroslav@413
    82
            </sequential>
jaroslav@413
    83
        </macrodef>
jaroslav@413
    84
    </target>
jaroslav@413
    85
    <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
jaroslav@413
    86
        <fail message="Java 9 support requires Ant 1.10.0 or higher.">
jaroslav@413
    87
            <condition>
jaroslav@413
    88
                <not>
jaroslav@413
    89
                    <antversion atleast="1.10.0"/>
jaroslav@413
    90
                </not>
jaroslav@413
    91
            </condition>
jaroslav@413
    92
        </fail>
jaroslav@413
    93
        <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
jaroslav@413
    94
        <condition property="named.module.internal">
jaroslav@413
    95
            <and>
jaroslav@413
    96
                <isset property="module.name"/>
jaroslav@413
    97
                <length length="0" string="${module.name}" when="greater"/>
jaroslav@413
    98
            </and>
jaroslav@413
    99
        </condition>
jaroslav@413
   100
        <condition property="unnamed.module.internal">
jaroslav@413
   101
            <not>
jaroslav@413
   102
                <isset property="named.module.internal"/>
jaroslav@413
   103
            </not>
jaroslav@413
   104
        </condition>
jaroslav@413
   105
        <property name="javac.modulepath" value=""/>
jaroslav@413
   106
        <property name="run.modulepath" value="${javac.modulepath}"/>
jaroslav@413
   107
        <property name="module.build.classes.dir" value="${build.classes.dir}"/>
jaroslav@413
   108
        <property name="debug.modulepath" value="${run.modulepath}"/>
jaroslav@413
   109
        <property name="javac.upgrademodulepath" value=""/>
jaroslav@413
   110
        <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
jaroslav@413
   111
        <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
jaroslav@413
   112
            <and>
jaroslav@413
   113
                <isset property="javac.systemmodulepath"/>
jaroslav@413
   114
                <length length="0" string="${javac.systemmodulepath}" when="greater"/>
jaroslav@413
   115
            </and>
jaroslav@413
   116
        </condition>
jaroslav@413
   117
        <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
jaroslav@413
   118
        <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
jaroslav@413
   119
        <property name="module.name" value=""/>
jaroslav@413
   120
    </target>
jaroslav@413
   121
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
jaroslav@413
   122
        <property name="platform.java" value="${java.home}/bin/java"/>
jtulach@70
   123
        <available file="${manifest.file}" property="manifest.available"/>
jaroslav@413
   124
        <condition property="splashscreen.available">
jtulach@70
   125
            <and>
jaroslav@413
   126
                <not>
jaroslav@413
   127
                    <equals arg1="${application.splash}" arg2="" trim="true"/>
jaroslav@413
   128
                </not>
jaroslav@413
   129
                <available file="${application.splash}"/>
jaroslav@413
   130
            </and>
jaroslav@413
   131
        </condition>
jaroslav@413
   132
        <condition property="main.class.available">
jaroslav@413
   133
            <and>
jtulach@70
   134
                <isset property="main.class"/>
jtulach@70
   135
                <not>
jtulach@70
   136
                    <equals arg1="${main.class}" arg2="" trim="true"/>
jtulach@70
   137
                </not>
jtulach@70
   138
            </and>
jtulach@70
   139
        </condition>
jaroslav@413
   140
        <condition property="profile.available">
jtulach@70
   141
            <and>
jaroslav@413
   142
                <isset property="javac.profile"/>
jaroslav@413
   143
                <length length="0" string="${javac.profile}" when="greater"/>
jaroslav@413
   144
                <not>
jaroslav@413
   145
                    <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
jaroslav@413
   146
                </not>
jaroslav@413
   147
            </and>
jaroslav@413
   148
        </condition>
jaroslav@413
   149
        <condition property="do.archive">
jaroslav@413
   150
            <or>
jaroslav@413
   151
                <not>
jaroslav@413
   152
                    <istrue value="${jar.archive.disabled}"/>
jaroslav@413
   153
                </not>
jaroslav@413
   154
                <istrue value="${not.archive.disabled}"/>
jaroslav@413
   155
            </or>
jaroslav@413
   156
        </condition>
jaroslav@413
   157
        <condition property="do.archive+manifest.available">
jaroslav@413
   158
            <and>
jaroslav@413
   159
                <isset property="manifest.available"/>
jaroslav@413
   160
                <istrue value="${do.archive}"/>
jaroslav@413
   161
            </and>
jaroslav@413
   162
        </condition>
jaroslav@413
   163
        <condition property="do.archive+main.class.available">
jaroslav@413
   164
            <and>
jaroslav@413
   165
                <isset property="main.class.available"/>
jaroslav@413
   166
                <istrue value="${do.archive}"/>
jaroslav@413
   167
            </and>
jaroslav@413
   168
        </condition>
jaroslav@413
   169
        <condition property="do.archive+splashscreen.available">
jaroslav@413
   170
            <and>
jaroslav@413
   171
                <isset property="splashscreen.available"/>
jaroslav@413
   172
                <istrue value="${do.archive}"/>
jaroslav@413
   173
            </and>
jaroslav@413
   174
        </condition>
jaroslav@413
   175
        <condition property="do.archive+profile.available">
jaroslav@413
   176
            <and>
jaroslav@413
   177
                <isset property="profile.available"/>
jaroslav@413
   178
                <istrue value="${do.archive}"/>
jtulach@70
   179
            </and>
jtulach@70
   180
        </condition>
jtulach@70
   181
        <condition property="have.tests">
jtulach@70
   182
            <or>
jtulach@70
   183
                <available file="${test.src.dir}"/>
jtulach@70
   184
            </or>
jtulach@70
   185
        </condition>
jtulach@70
   186
        <condition property="have.sources">
jtulach@70
   187
            <or>
jtulach@70
   188
                <available file="${src.dir}"/>
jtulach@70
   189
            </or>
jtulach@70
   190
        </condition>
jtulach@70
   191
        <condition property="netbeans.home+have.tests">
jtulach@70
   192
            <and>
jtulach@70
   193
                <isset property="netbeans.home"/>
jtulach@70
   194
                <isset property="have.tests"/>
jtulach@70
   195
            </and>
jtulach@70
   196
        </condition>
jtulach@70
   197
        <condition property="no.javadoc.preview">
jtulach@70
   198
            <and>
jtulach@70
   199
                <isset property="javadoc.preview"/>
jtulach@70
   200
                <isfalse value="${javadoc.preview}"/>
jtulach@70
   201
            </and>
jtulach@70
   202
        </condition>
jtulach@70
   203
        <property name="run.jvmargs" value=""/>
jaroslav@413
   204
        <property name="run.jvmargs.ide" value=""/>
jtulach@70
   205
        <property name="javac.compilerargs" value=""/>
jtulach@70
   206
        <property name="work.dir" value="${basedir}"/>
jtulach@70
   207
        <condition property="no.deps">
jtulach@70
   208
            <and>
jtulach@70
   209
                <istrue value="${no.dependencies}"/>
jtulach@70
   210
            </and>
jtulach@70
   211
        </condition>
jtulach@70
   212
        <property name="javac.debug" value="true"/>
jtulach@70
   213
        <property name="javadoc.preview" value="true"/>
jtulach@70
   214
        <property name="application.args" value=""/>
jtulach@70
   215
        <property name="source.encoding" value="${file.encoding}"/>
jaroslav@413
   216
        <property name="runtime.encoding" value="${source.encoding}"/>
jaroslav@413
   217
        <property name="manifest.encoding" value="${source.encoding}"/>
jtulach@70
   218
        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
jtulach@70
   219
            <and>
jtulach@70
   220
                <isset property="javadoc.encoding"/>
jtulach@70
   221
                <not>
jtulach@70
   222
                    <equals arg1="${javadoc.encoding}" arg2=""/>
jtulach@70
   223
                </not>
jtulach@70
   224
            </and>
jtulach@70
   225
        </condition>
jtulach@70
   226
        <property name="javadoc.encoding.used" value="${source.encoding}"/>
jtulach@70
   227
        <property name="includes" value="**"/>
jtulach@70
   228
        <property name="excludes" value=""/>
jtulach@70
   229
        <property name="do.depend" value="false"/>
jtulach@70
   230
        <condition property="do.depend.true">
jtulach@70
   231
            <istrue value="${do.depend}"/>
jtulach@70
   232
        </condition>
jaroslav@413
   233
        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
jaroslav@413
   234
        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
jtulach@70
   235
            <and>
jaroslav@413
   236
                <isset property="endorsed.classpath"/>
jaroslav@413
   237
                <not>
jaroslav@413
   238
                    <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
jaroslav@413
   239
                </not>
jtulach@70
   240
            </and>
jtulach@70
   241
        </condition>
jaroslav@413
   242
        <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
jaroslav@413
   243
            <isset property="profile.available"/>
jaroslav@413
   244
        </condition>
jaroslav@413
   245
        <condition else="false" property="jdkBug6558476">
jaroslav@413
   246
            <and>
jaroslav@413
   247
                <matches pattern="1\.[56]" string="${java.specification.version}"/>
jaroslav@413
   248
                <not>
jaroslav@413
   249
                    <os family="unix"/>
jaroslav@413
   250
                </not>
jaroslav@413
   251
            </and>
jaroslav@413
   252
        </condition>
jaroslav@413
   253
        <condition else="false" property="javac.fork">
jaroslav@413
   254
            <or>
jaroslav@413
   255
                <istrue value="${jdkBug6558476}"/>
jaroslav@413
   256
                <istrue value="${javac.external.vm}"/>
jaroslav@413
   257
            </or>
jaroslav@413
   258
        </condition>
jaroslav@413
   259
        <property name="jar.index" value="false"/>
jaroslav@413
   260
        <property name="jar.index.metainf" value="${jar.index}"/>
jaroslav@413
   261
        <property name="copylibs.rebase" value="true"/>
jaroslav@413
   262
        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
jaroslav@413
   263
        <condition property="junit.available">
jaroslav@413
   264
            <or>
jaroslav@413
   265
                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
jaroslav@413
   266
                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
jaroslav@413
   267
            </or>
jaroslav@413
   268
        </condition>
jaroslav@413
   269
        <condition property="testng.available">
jaroslav@413
   270
            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
jaroslav@413
   271
        </condition>
jaroslav@413
   272
        <condition property="junit+testng.available">
jaroslav@413
   273
            <and>
jaroslav@413
   274
                <istrue value="${junit.available}"/>
jaroslav@413
   275
                <istrue value="${testng.available}"/>
jaroslav@413
   276
            </and>
jaroslav@413
   277
        </condition>
jaroslav@413
   278
        <condition else="testng" property="testng.mode" value="mixed">
jaroslav@413
   279
            <istrue value="${junit+testng.available}"/>
jaroslav@413
   280
        </condition>
jaroslav@413
   281
        <condition else="" property="testng.debug.mode" value="-mixed">
jaroslav@413
   282
            <istrue value="${junit+testng.available}"/>
jaroslav@413
   283
        </condition>
jaroslav@413
   284
        <property name="java.failonerror" value="true"/>
jtulach@70
   285
    </target>
jtulach@70
   286
    <target name="-post-init">
jtulach@70
   287
        <!-- Empty placeholder for easier customization. -->
jtulach@70
   288
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
   289
    </target>
jtulach@70
   290
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
jtulach@70
   291
        <fail unless="src.dir">Must set src.dir</fail>
jtulach@70
   292
        <fail unless="test.src.dir">Must set test.src.dir</fail>
jtulach@70
   293
        <fail unless="build.dir">Must set build.dir</fail>
jtulach@70
   294
        <fail unless="dist.dir">Must set dist.dir</fail>
jtulach@70
   295
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
jtulach@70
   296
        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
jtulach@70
   297
        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
jtulach@70
   298
        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
jtulach@70
   299
        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
jtulach@70
   300
        <fail unless="dist.jar">Must set dist.jar</fail>
jtulach@70
   301
    </target>
jtulach@70
   302
    <target name="-init-macrodef-property">
jtulach@70
   303
        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@70
   304
            <attribute name="name"/>
jtulach@70
   305
            <attribute name="value"/>
jtulach@70
   306
            <sequential>
jtulach@70
   307
                <property name="@{name}" value="${@{value}}"/>
jtulach@70
   308
            </sequential>
jtulach@70
   309
        </macrodef>
jtulach@70
   310
    </target>
jaroslav@413
   311
    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
jtulach@70
   312
        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@70
   313
            <attribute default="${src.dir}" name="srcdir"/>
jtulach@70
   314
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@70
   315
            <attribute default="${javac.classpath}" name="classpath"/>
jaroslav@413
   316
            <attribute default="${javac.modulepath}" name="modulepath"/>
jaroslav@413
   317
            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
jaroslav@413
   318
            <attribute default="${javac.processorpath}" name="processorpath"/>
jaroslav@413
   319
            <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
jaroslav@413
   320
            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
jtulach@70
   321
            <attribute default="${includes}" name="includes"/>
jtulach@70
   322
            <attribute default="${excludes}" name="excludes"/>
jtulach@70
   323
            <attribute default="${javac.debug}" name="debug"/>
jaroslav@413
   324
            <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
jaroslav@413
   325
            <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
jaroslav@413
   326
            <attribute default="${empty.dir}" name="gensrcdir"/>
jtulach@70
   327
            <element name="customize" optional="true"/>
jtulach@70
   328
            <sequential>
jaroslav@413
   329
                <condition property="warn.excludes.internal">
jaroslav@413
   330
                    <and>
jaroslav@413
   331
                        <isset property="named.module.internal"/>
jaroslav@413
   332
                        <length length="0" string="@{excludes}" trim="true" when="greater"/>
jaroslav@413
   333
                    </and>
jaroslav@413
   334
                </condition>
jaroslav@413
   335
                <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
jaroslav@413
   336
                <property location="${build.dir}/empty" name="empty.dir"/>
jaroslav@413
   337
                <mkdir dir="${empty.dir}"/>
jaroslav@413
   338
                <mkdir dir="@{apgeneratedsrcdir}"/>
jaroslav@413
   339
                <condition property="processormodulepath.set">
jaroslav@413
   340
                    <resourcecount count="0" when="greater">
jaroslav@413
   341
                        <path>
jaroslav@413
   342
                            <pathelement path="@{processormodulepath}"/>
jaroslav@413
   343
                        </path>
jaroslav@413
   344
                    </resourcecount>
jaroslav@413
   345
                </condition>
jaroslav@413
   346
                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
jaroslav@413
   347
                    <src>
jaroslav@413
   348
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
jaroslav@413
   349
                            <include name="*"/>
jaroslav@413
   350
                        </dirset>
jaroslav@413
   351
                    </src>
jtulach@70
   352
                    <classpath>
jtulach@70
   353
                        <path path="@{classpath}"/>
jtulach@70
   354
                    </classpath>
jaroslav@413
   355
                    <modulepath>
jaroslav@413
   356
                        <path path="@{modulepath}"/>
jaroslav@413
   357
                    </modulepath>
jaroslav@413
   358
                    <upgrademodulepath>
jaroslav@413
   359
                        <path path="@{upgrademodulepath}"/>
jaroslav@413
   360
                    </upgrademodulepath>
jaroslav@413
   361
                    <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
jaroslav@413
   362
                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
jaroslav@413
   363
                    <compilerarg line="${javac.compilerargs}"/>
jaroslav@413
   364
                    <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
jaroslav@413
   365
                    <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
jaroslav@413
   366
                    <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
jaroslav@413
   367
                    <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
jaroslav@413
   368
                    <compilerarg line="${ap.processors.internal}"/>
jaroslav@413
   369
                    <compilerarg line="${annotation.processing.processor.options}"/>
jaroslav@413
   370
                    <compilerarg value="-s"/>
jaroslav@413
   371
                    <compilerarg path="@{apgeneratedsrcdir}"/>
jaroslav@413
   372
                    <compilerarg line="${ap.proc.none.internal}"/>
jtulach@70
   373
                    <customize/>
jtulach@70
   374
                </javac>
jtulach@70
   375
            </sequential>
jtulach@70
   376
        </macrodef>
jaroslav@413
   377
    </target>
jaroslav@413
   378
    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
jaroslav@413
   379
        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   380
            <attribute default="${src.dir}" name="srcdir"/>
jaroslav@413
   381
            <attribute default="${build.classes.dir}" name="destdir"/>
jaroslav@413
   382
            <attribute default="${javac.classpath}" name="classpath"/>
jaroslav@413
   383
            <attribute default="${javac.modulepath}" name="modulepath"/>
jaroslav@413
   384
            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
jaroslav@413
   385
            <attribute default="${javac.processorpath}" name="processorpath"/>
jaroslav@413
   386
            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
jaroslav@413
   387
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   388
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   389
            <attribute default="${javac.debug}" name="debug"/>
jaroslav@413
   390
            <attribute default="${empty.dir}" name="sourcepath"/>
jaroslav@413
   391
            <attribute default="${empty.dir}" name="gensrcdir"/>
jaroslav@413
   392
            <element name="customize" optional="true"/>
jaroslav@413
   393
            <sequential>
jaroslav@413
   394
                <property location="${build.dir}/empty" name="empty.dir"/>
jaroslav@413
   395
                <mkdir dir="${empty.dir}"/>
jaroslav@413
   396
                <mkdir dir="@{apgeneratedsrcdir}"/>
jaroslav@413
   397
                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
jaroslav@413
   398
                    <src>
jaroslav@413
   399
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
jaroslav@413
   400
                            <include name="*"/>
jaroslav@413
   401
                        </dirset>
jaroslav@413
   402
                    </src>
jaroslav@413
   403
                    <classpath>
jaroslav@413
   404
                        <path path="@{classpath}"/>
jaroslav@413
   405
                    </classpath>
jaroslav@413
   406
                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
jaroslav@413
   407
                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
jaroslav@413
   408
                    <compilerarg line="${javac.compilerargs}"/>
jaroslav@413
   409
                    <compilerarg value="-processorpath"/>
jaroslav@413
   410
                    <compilerarg path="@{processorpath}:${empty.dir}"/>
jaroslav@413
   411
                    <compilerarg line="${ap.processors.internal}"/>
jaroslav@413
   412
                    <compilerarg line="${annotation.processing.processor.options}"/>
jaroslav@413
   413
                    <compilerarg value="-s"/>
jaroslav@413
   414
                    <compilerarg path="@{apgeneratedsrcdir}"/>
jaroslav@413
   415
                    <compilerarg line="${ap.proc.none.internal}"/>
jaroslav@413
   416
                    <customize/>
jaroslav@413
   417
                </javac>
jaroslav@413
   418
            </sequential>
jaroslav@413
   419
        </macrodef>
jaroslav@413
   420
    </target>
jaroslav@413
   421
    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
jaroslav@413
   422
        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   423
            <attribute default="${src.dir}" name="srcdir"/>
jaroslav@413
   424
            <attribute default="${build.classes.dir}" name="destdir"/>
jaroslav@413
   425
            <attribute default="${javac.classpath}" name="classpath"/>
jaroslav@413
   426
            <attribute default="${javac.modulepath}" name="modulepath"/>
jaroslav@413
   427
            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
jaroslav@413
   428
            <attribute default="${javac.processorpath}" name="processorpath"/>
jaroslav@413
   429
            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
jaroslav@413
   430
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   431
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   432
            <attribute default="${javac.debug}" name="debug"/>
jaroslav@413
   433
            <attribute default="${empty.dir}" name="sourcepath"/>
jaroslav@413
   434
            <attribute default="${empty.dir}" name="gensrcdir"/>
jaroslav@413
   435
            <element name="customize" optional="true"/>
jaroslav@413
   436
            <sequential>
jaroslav@413
   437
                <property location="${build.dir}/empty" name="empty.dir"/>
jaroslav@413
   438
                <mkdir dir="${empty.dir}"/>
jaroslav@413
   439
                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
jaroslav@413
   440
                    <src>
jaroslav@413
   441
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
jaroslav@413
   442
                            <include name="*"/>
jaroslav@413
   443
                        </dirset>
jaroslav@413
   444
                    </src>
jaroslav@413
   445
                    <classpath>
jaroslav@413
   446
                        <path path="@{classpath}"/>
jaroslav@413
   447
                    </classpath>
jaroslav@413
   448
                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
jaroslav@413
   449
                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
jaroslav@413
   450
                    <compilerarg line="${javac.compilerargs}"/>
jaroslav@413
   451
                    <customize/>
jaroslav@413
   452
                </javac>
jaroslav@413
   453
            </sequential>
jaroslav@413
   454
        </macrodef>
jaroslav@413
   455
    </target>
jaroslav@413
   456
    <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
jtulach@70
   457
        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@70
   458
            <attribute default="${src.dir}" name="srcdir"/>
jtulach@70
   459
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@70
   460
            <attribute default="${javac.classpath}" name="classpath"/>
jtulach@70
   461
            <sequential>
jtulach@70
   462
                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
jtulach@70
   463
                    <classpath>
jtulach@70
   464
                        <path path="@{classpath}"/>
jtulach@70
   465
                    </classpath>
jtulach@70
   466
                </depend>
jtulach@70
   467
            </sequential>
jtulach@70
   468
        </macrodef>
jtulach@70
   469
        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@70
   470
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@70
   471
            <sequential>
jtulach@70
   472
                <fail unless="javac.includes">Must set javac.includes</fail>
jaroslav@413
   473
                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
jtulach@70
   474
                    <path>
jtulach@70
   475
                        <filelist dir="@{destdir}" files="${javac.includes}"/>
jtulach@70
   476
                    </path>
jtulach@70
   477
                    <globmapper from="*.java" to="*.class"/>
jtulach@70
   478
                </pathconvert>
jaroslav@413
   479
                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
jaroslav@413
   480
                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
jtulach@70
   481
                <delete>
jaroslav@413
   482
                    <files includesfile="${javac.includesfile.binary}"/>
jaroslav@413
   483
                </delete>
jaroslav@413
   484
                <delete>
jaroslav@413
   485
                    <fileset file="${javac.includesfile.binary}"/>
jtulach@70
   486
                </delete>
jtulach@70
   487
            </sequential>
jtulach@70
   488
        </macrodef>
jtulach@70
   489
    </target>
jaroslav@413
   490
    <target if="${junit.available}" name="-init-macrodef-junit-init">
jaroslav@413
   491
        <condition else="false" property="nb.junit.batch" value="true">
jaroslav@413
   492
            <and>
jaroslav@413
   493
                <istrue value="${junit.available}"/>
jaroslav@413
   494
                <not>
jaroslav@413
   495
                    <isset property="test.method"/>
jaroslav@413
   496
                </not>
jaroslav@413
   497
            </and>
jaroslav@413
   498
        </condition>
jaroslav@413
   499
        <condition else="false" property="nb.junit.single" value="true">
jaroslav@413
   500
            <and>
jaroslav@413
   501
                <istrue value="${junit.available}"/>
jaroslav@413
   502
                <isset property="test.method"/>
jaroslav@413
   503
            </and>
jaroslav@413
   504
        </condition>
jaroslav@413
   505
    </target>
jaroslav@413
   506
    <target name="-init-test-properties">
jaroslav@413
   507
        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
jaroslav@413
   508
        <property name="test.binarytestincludes" value=""/>
jaroslav@413
   509
        <property name="test.binaryexcludes" value=""/>
jaroslav@413
   510
    </target>
jaroslav@413
   511
    <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
jaroslav@413
   512
        <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   513
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   514
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   515
            <element name="customizePrototype" optional="true"/>
jaroslav@413
   516
            <sequential>
jaroslav@413
   517
                <property name="junit.forkmode" value="perTest"/>
jaroslav@413
   518
                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
jaroslav@413
   519
                    <syspropertyset>
jaroslav@413
   520
                        <propertyref prefix="test-sys-prop."/>
jaroslav@413
   521
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
jaroslav@413
   522
                    </syspropertyset>
jaroslav@413
   523
                    <classpath>
jaroslav@413
   524
                        <path path="${run.test.classpath}"/>
jaroslav@413
   525
                    </classpath>
jaroslav@413
   526
                    <modulepath>
jaroslav@413
   527
                        <path path="${run.test.modulepath}"/>
jaroslav@413
   528
                    </modulepath>
jaroslav@413
   529
                    <formatter type="brief" usefile="false"/>
jaroslav@413
   530
                    <formatter type="xml"/>
jaroslav@413
   531
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
jaroslav@413
   532
                    <jvmarg value="-ea"/>
jaroslav@413
   533
                    <jvmarg line="${run.test.jvmargs}"/>
jaroslav@413
   534
                    <customizePrototype/>
jaroslav@413
   535
                </junit>
jaroslav@413
   536
            </sequential>
jaroslav@413
   537
        </macrodef>
jaroslav@413
   538
    </target>
jaroslav@413
   539
    <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
jaroslav@413
   540
        <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   541
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   542
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   543
            <element name="customizePrototype" optional="true"/>
jaroslav@413
   544
            <sequential>
jaroslav@413
   545
                <property name="junit.forkmode" value="perTest"/>
jaroslav@413
   546
                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
jaroslav@413
   547
                    <syspropertyset>
jaroslav@413
   548
                        <propertyref prefix="test-sys-prop."/>
jaroslav@413
   549
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
jaroslav@413
   550
                    </syspropertyset>
jaroslav@413
   551
                    <classpath>
jaroslav@413
   552
                        <path path="${run.test.classpath}"/>
jaroslav@413
   553
                    </classpath>
jaroslav@413
   554
                    <formatter type="brief" usefile="false"/>
jaroslav@413
   555
                    <formatter type="xml"/>
jaroslav@413
   556
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
jaroslav@413
   557
                    <jvmarg value="-ea"/>
jaroslav@413
   558
                    <customizePrototype/>
jaroslav@413
   559
                </junit>
jaroslav@413
   560
            </sequential>
jaroslav@413
   561
        </macrodef>
jaroslav@413
   562
    </target>
jaroslav@413
   563
    <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
jtulach@70
   564
        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@70
   565
            <attribute default="${includes}" name="includes"/>
jtulach@70
   566
            <attribute default="${excludes}" name="excludes"/>
jtulach@70
   567
            <attribute default="**" name="testincludes"/>
jaroslav@413
   568
            <attribute default="" name="testmethods"/>
jaroslav@413
   569
            <element name="customize" optional="true"/>
jtulach@70
   570
            <sequential>
jaroslav@413
   571
                <j2seproject3:junit-prototype>
jaroslav@413
   572
                    <customizePrototype>
jaroslav@413
   573
                        <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
jaroslav@413
   574
                        <customize/>
jaroslav@413
   575
                    </customizePrototype>
jaroslav@413
   576
                </j2seproject3:junit-prototype>
jaroslav@413
   577
            </sequential>
jaroslav@413
   578
        </macrodef>
jaroslav@413
   579
    </target>
jaroslav@413
   580
    <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
jaroslav@413
   581
        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   582
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   583
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   584
            <attribute default="**" name="testincludes"/>
jaroslav@413
   585
            <attribute default="" name="testmethods"/>
jaroslav@413
   586
            <element name="customize" optional="true"/>
jaroslav@413
   587
            <sequential>
jaroslav@413
   588
                <j2seproject3:junit-prototype>
jaroslav@413
   589
                    <customizePrototype>
jaroslav@413
   590
                        <batchtest todir="${build.test.results.dir}">
jaroslav@413
   591
                            <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
jaroslav@413
   592
                                <filename name="@{testincludes}"/>
jaroslav@413
   593
                            </fileset>
jaroslav@413
   594
                            <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
jaroslav@413
   595
                                <filename name="${test.binarytestincludes}"/>
jaroslav@413
   596
                            </fileset>
jaroslav@413
   597
                        </batchtest>
jaroslav@413
   598
                        <customize/>
jaroslav@413
   599
                    </customizePrototype>
jaroslav@413
   600
                </j2seproject3:junit-prototype>
jaroslav@413
   601
            </sequential>
jaroslav@413
   602
        </macrodef>
jaroslav@413
   603
    </target>
jaroslav@413
   604
    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
jaroslav@413
   605
    <target if="${testng.available}" name="-init-macrodef-testng">
jaroslav@413
   606
        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   607
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   608
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   609
            <attribute default="**" name="testincludes"/>
jaroslav@413
   610
            <attribute default="" name="testmethods"/>
jaroslav@413
   611
            <element name="customize" optional="true"/>
jaroslav@413
   612
            <sequential>
jaroslav@413
   613
                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
jaroslav@413
   614
                    <isset property="test.method"/>
jaroslav@413
   615
                </condition>
jaroslav@413
   616
                <union id="test.set">
jaroslav@413
   617
                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
jaroslav@413
   618
                        <filename name="@{testincludes}"/>
jaroslav@413
   619
                    </fileset>
jaroslav@413
   620
                </union>
jaroslav@413
   621
                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
jaroslav@413
   622
                <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="hellowithsubclassing" testname="TestNG tests" workingDir="${work.dir}">
jaroslav@413
   623
                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
jaroslav@413
   624
                    <propertyset>
jaroslav@413
   625
                        <propertyref prefix="test-sys-prop."/>
jaroslav@413
   626
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
jaroslav@413
   627
                    </propertyset>
jtulach@70
   628
                    <classpath>
jtulach@70
   629
                        <path path="${run.test.classpath}"/>
jtulach@70
   630
                    </classpath>
jaroslav@413
   631
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
jaroslav@413
   632
                    <customize/>
jaroslav@413
   633
                </testng>
jtulach@70
   634
            </sequential>
jtulach@70
   635
        </macrodef>
jtulach@70
   636
    </target>
jaroslav@413
   637
    <target name="-init-macrodef-test-impl">
jaroslav@413
   638
        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   639
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   640
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   641
            <attribute default="**" name="testincludes"/>
jaroslav@413
   642
            <attribute default="" name="testmethods"/>
jaroslav@413
   643
            <element implicit="true" name="customize" optional="true"/>
jaroslav@413
   644
            <sequential>
jaroslav@413
   645
                <echo>No tests executed.</echo>
jaroslav@413
   646
            </sequential>
jaroslav@413
   647
        </macrodef>
jaroslav@413
   648
    </target>
jaroslav@413
   649
    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
jaroslav@413
   650
        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   651
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   652
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   653
            <attribute default="**" name="testincludes"/>
jaroslav@413
   654
            <attribute default="" name="testmethods"/>
jaroslav@413
   655
            <element implicit="true" name="customize" optional="true"/>
jaroslav@413
   656
            <sequential>
jaroslav@413
   657
                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
jaroslav@413
   658
                    <customize/>
jaroslav@413
   659
                </j2seproject3:junit>
jaroslav@413
   660
            </sequential>
jaroslav@413
   661
        </macrodef>
jaroslav@413
   662
    </target>
jaroslav@413
   663
    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
jaroslav@413
   664
        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   665
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   666
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   667
            <attribute default="**" name="testincludes"/>
jaroslav@413
   668
            <attribute default="" name="testmethods"/>
jaroslav@413
   669
            <element implicit="true" name="customize" optional="true"/>
jaroslav@413
   670
            <sequential>
jaroslav@413
   671
                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
jaroslav@413
   672
                    <customize/>
jaroslav@413
   673
                </j2seproject3:testng>
jaroslav@413
   674
            </sequential>
jaroslav@413
   675
        </macrodef>
jaroslav@413
   676
    </target>
jaroslav@413
   677
    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
jaroslav@413
   678
        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   679
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   680
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   681
            <attribute default="**" name="testincludes"/>
jaroslav@413
   682
            <attribute default="" name="testmethods"/>
jaroslav@413
   683
            <sequential>
jaroslav@413
   684
                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
jaroslav@413
   685
                    <customize>
jaroslav@413
   686
                        <jvmarg line="${run.jvmargs}"/>
jaroslav@413
   687
                        <jvmarg line="${run.jvmargs.ide}"/>
jaroslav@413
   688
                    </customize>
jaroslav@413
   689
                </j2seproject3:test-impl>
jaroslav@413
   690
            </sequential>
jaroslav@413
   691
        </macrodef>
jaroslav@413
   692
    </target>
jaroslav@413
   693
    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
jaroslav@413
   694
        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   695
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   696
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   697
            <attribute default="**" name="testincludes"/>
jaroslav@413
   698
            <attribute default="" name="testmethods"/>
jaroslav@413
   699
            <element name="customizeDebuggee" optional="true"/>
jaroslav@413
   700
            <sequential>
jaroslav@413
   701
                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
jaroslav@413
   702
                    <customize>
jaroslav@413
   703
                        <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
jaroslav@413
   704
                        <customizeDebuggee/>
jaroslav@413
   705
                    </customize>
jaroslav@413
   706
                </j2seproject3:junit>
jaroslav@413
   707
            </sequential>
jaroslav@413
   708
        </macrodef>
jaroslav@413
   709
    </target>
jaroslav@413
   710
    <target if="${testng.available}" name="-init-macrodef-testng-debug">
jaroslav@413
   711
        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   712
            <attribute default="${main.class}" name="testClass"/>
jaroslav@413
   713
            <attribute default="" name="testMethod"/>
jaroslav@413
   714
            <element name="customize2" optional="true"/>
jaroslav@413
   715
            <sequential>
jaroslav@413
   716
                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
jaroslav@413
   717
                    <isset property="test.method"/>
jaroslav@413
   718
                </condition>
jaroslav@413
   719
                <condition else="-suitename hellowithsubclassing -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
jaroslav@413
   720
                    <matches pattern=".*\.xml" string="@{testClass}"/>
jaroslav@413
   721
                </condition>
jaroslav@413
   722
                <delete dir="${build.test.results.dir}" quiet="true"/>
jaroslav@413
   723
                <mkdir dir="${build.test.results.dir}"/>
jaroslav@413
   724
                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
jaroslav@413
   725
                    <customizeDebuggee>
jaroslav@413
   726
                        <customize2/>
jaroslav@413
   727
                        <jvmarg value="-ea"/>
jaroslav@413
   728
                        <arg line="${testng.debug.mode}"/>
jaroslav@413
   729
                        <arg line="-d ${build.test.results.dir}"/>
jaroslav@413
   730
                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
jaroslav@413
   731
                        <arg line="${testng.cmd.args}"/>
jaroslav@413
   732
                    </customizeDebuggee>
jaroslav@413
   733
                </j2seproject3:debug>
jaroslav@413
   734
            </sequential>
jaroslav@413
   735
        </macrodef>
jaroslav@413
   736
    </target>
jaroslav@413
   737
    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
jaroslav@413
   738
        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   739
            <attribute default="${main.class}" name="testClass"/>
jaroslav@413
   740
            <attribute default="" name="testMethod"/>
jaroslav@413
   741
            <element implicit="true" name="customize2" optional="true"/>
jaroslav@413
   742
            <sequential>
jaroslav@413
   743
                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
jaroslav@413
   744
                    <customize2/>
jaroslav@413
   745
                </j2seproject3:testng-debug>
jaroslav@413
   746
            </sequential>
jaroslav@413
   747
        </macrodef>
jaroslav@413
   748
    </target>
jaroslav@413
   749
    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
jaroslav@413
   750
        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   751
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   752
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   753
            <attribute default="**" name="testincludes"/>
jaroslav@413
   754
            <attribute default="" name="testmethods"/>
jaroslav@413
   755
            <attribute default="${main.class}" name="testClass"/>
jaroslav@413
   756
            <attribute default="" name="testMethod"/>
jaroslav@413
   757
            <sequential>
jaroslav@413
   758
                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
jaroslav@413
   759
                    <customizeDebuggee>
jaroslav@413
   760
                        <jvmarg line="${run.jvmargs}"/>
jaroslav@413
   761
                        <jvmarg line="${run.jvmargs.ide}"/>
jaroslav@413
   762
                    </customizeDebuggee>
jaroslav@413
   763
                </j2seproject3:test-debug-impl>
jaroslav@413
   764
            </sequential>
jaroslav@413
   765
        </macrodef>
jaroslav@413
   766
    </target>
jaroslav@413
   767
    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
jaroslav@413
   768
        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   769
            <attribute default="${includes}" name="includes"/>
jaroslav@413
   770
            <attribute default="${excludes}" name="excludes"/>
jaroslav@413
   771
            <attribute default="**" name="testincludes"/>
jaroslav@413
   772
            <attribute default="" name="testmethods"/>
jaroslav@413
   773
            <attribute default="${main.class}" name="testClass"/>
jaroslav@413
   774
            <attribute default="" name="testMethod"/>
jaroslav@413
   775
            <sequential>
jaroslav@413
   776
                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
jaroslav@413
   777
                    <customize2>
jaroslav@413
   778
                        <syspropertyset>
jaroslav@413
   779
                            <propertyref prefix="test-sys-prop."/>
jaroslav@413
   780
                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
jaroslav@413
   781
                        </syspropertyset>
jaroslav@413
   782
                    </customize2>
jaroslav@413
   783
                </j2seproject3:testng-debug-impl>
jaroslav@413
   784
            </sequential>
jaroslav@413
   785
        </macrodef>
jaroslav@413
   786
    </target>
jaroslav@413
   787
    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
jaroslav@413
   788
    <!--
jaroslav@413
   789
                pre NB7.2 profiling section; consider it deprecated
jaroslav@413
   790
            -->
jaroslav@413
   791
    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
jaroslav@413
   792
    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
jaroslav@413
   793
        <!-- Empty placeholder for easier customization. -->
jaroslav@413
   794
        <!-- You can override this target in the ../build.xml file. -->
jaroslav@413
   795
    </target>
jaroslav@413
   796
    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
jaroslav@413
   797
        <!-- Empty placeholder for easier customization. -->
jaroslav@413
   798
        <!-- You can override this target in the ../build.xml file. -->
jaroslav@413
   799
    </target>
jaroslav@413
   800
    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
jaroslav@413
   801
        <macrodef name="resolve">
jaroslav@413
   802
            <attribute name="name"/>
jaroslav@413
   803
            <attribute name="value"/>
jaroslav@413
   804
            <sequential>
jaroslav@413
   805
                <property name="@{name}" value="${env.@{value}}"/>
jaroslav@413
   806
            </sequential>
jaroslav@413
   807
        </macrodef>
jaroslav@413
   808
        <macrodef name="profile">
jaroslav@413
   809
            <attribute default="${main.class}" name="classname"/>
jaroslav@413
   810
            <element name="customize" optional="true"/>
jaroslav@413
   811
            <sequential>
jaroslav@413
   812
                <property environment="env"/>
jaroslav@413
   813
                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
jaroslav@413
   814
                <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
jaroslav@413
   815
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
jaroslav@413
   816
                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
jaroslav@413
   817
                    <jvmarg line="${profiler.info.jvmargs}"/>
jaroslav@413
   818
                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
jaroslav@413
   819
                    <arg line="${application.args}"/>
jaroslav@413
   820
                    <classpath>
jaroslav@413
   821
                        <path path="${run.classpath}"/>
jaroslav@413
   822
                    </classpath>
jaroslav@413
   823
                    <syspropertyset>
jaroslav@413
   824
                        <propertyref prefix="run-sys-prop."/>
jaroslav@413
   825
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jaroslav@413
   826
                    </syspropertyset>
jaroslav@413
   827
                    <customize/>
jaroslav@413
   828
                </java>
jaroslav@413
   829
            </sequential>
jaroslav@413
   830
        </macrodef>
jaroslav@413
   831
    </target>
jaroslav@413
   832
    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
jaroslav@413
   833
        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
jaroslav@413
   834
        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
jaroslav@413
   835
    </target>
jaroslav@413
   836
    <!--
jaroslav@413
   837
                end of pre NB7.2 profiling section
jaroslav@413
   838
            -->
jaroslav@413
   839
    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
jtulach@70
   840
        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@70
   841
            <attribute default="${main.class}" name="name"/>
jaroslav@413
   842
            <attribute default="${debug.modulepath}" name="modulepath"/>
jtulach@70
   843
            <attribute default="${debug.classpath}" name="classpath"/>
jtulach@70
   844
            <attribute default="" name="stopclassname"/>
jtulach@70
   845
            <sequential>
jaroslav@413
   846
                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
jaroslav@413
   847
                    <modulepath>
jaroslav@413
   848
                        <path path="@{modulepath}"/>
jaroslav@413
   849
                    </modulepath>
jtulach@70
   850
                    <classpath>
jtulach@70
   851
                        <path path="@{classpath}"/>
jtulach@70
   852
                    </classpath>
jtulach@70
   853
                </nbjpdastart>
jtulach@70
   854
            </sequential>
jtulach@70
   855
        </macrodef>
jtulach@70
   856
        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@70
   857
            <attribute default="${build.classes.dir}" name="dir"/>
jtulach@70
   858
            <sequential>
jtulach@70
   859
                <nbjpdareload>
jaroslav@413
   860
                    <fileset dir="@{dir}" includes="${fix.classes}">
jaroslav@413
   861
                        <include name="${fix.includes}*.class"/>
jaroslav@413
   862
                    </fileset>
jtulach@70
   863
                </nbjpdareload>
jtulach@70
   864
            </sequential>
jtulach@70
   865
        </macrodef>
jtulach@70
   866
    </target>
jtulach@70
   867
    <target name="-init-debug-args">
jaroslav@413
   868
        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
jaroslav@413
   869
            <os family="windows"/>
jtulach@70
   870
        </condition>
jaroslav@413
   871
        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
jaroslav@413
   872
            <isset property="debug.transport"/>
jtulach@70
   873
        </condition>
jtulach@70
   874
    </target>
jtulach@70
   875
    <target depends="-init-debug-args" name="-init-macrodef-debug">
jtulach@70
   876
        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   877
            <attribute default="${module.name}" name="modulename"/>
jtulach@70
   878
            <attribute default="${main.class}" name="classname"/>
jaroslav@413
   879
            <attribute default="${debug.modulepath}" name="modulepath"/>
jtulach@70
   880
            <attribute default="${debug.classpath}" name="classpath"/>
jaroslav@413
   881
            <element name="customizeDebuggee" optional="true"/>
jaroslav@413
   882
            <sequential>
jaroslav@413
   883
                <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
jaroslav@413
   884
                    <customize>
jaroslav@413
   885
                        <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
jaroslav@413
   886
                        <customizeDebuggee/>
jaroslav@413
   887
                    </customize>
jaroslav@413
   888
                </j2seproject1:java>
jaroslav@413
   889
            </sequential>
jaroslav@413
   890
        </macrodef>
jaroslav@413
   891
    </target>
jaroslav@413
   892
    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
jaroslav@413
   893
        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
jaroslav@413
   894
            <attribute default="${module.name}" name="modulename"/>
jaroslav@413
   895
            <attribute default="${main.class}" name="classname"/>
jaroslav@413
   896
            <attribute default="${run.modulepath}" name="modulepath"/>
jaroslav@413
   897
            <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
jaroslav@413
   898
            <attribute default="${run.classpath}" name="classpath"/>
jaroslav@413
   899
            <attribute default="jvm" name="jvm"/>
jtulach@70
   900
            <element name="customize" optional="true"/>
jtulach@70
   901
            <sequential>
jaroslav@413
   902
                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
jaroslav@413
   903
                    <classpath>
jaroslav@413
   904
                        <path path="@{classpath}"/>
jaroslav@413
   905
                    </classpath>
jaroslav@413
   906
                    <modulepath>
jaroslav@413
   907
                        <pathelement path="@{modulepath}"/>
jaroslav@413
   908
                        <pathelement location="${module.build.classes.dir}"/>
jaroslav@413
   909
                    </modulepath>
jaroslav@413
   910
                    <upgrademodulepath>
jaroslav@413
   911
                        <path path="@{upgrademodulepath}"/>
jaroslav@413
   912
                    </upgrademodulepath>
jaroslav@413
   913
                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
jaroslav@413
   914
                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
jtulach@70
   915
                    <jvmarg line="${run.jvmargs}"/>
jaroslav@413
   916
                    <jvmarg line="${run.jvmargs.ide}"/>
jaroslav@413
   917
                    <syspropertyset>
jaroslav@413
   918
                        <propertyref prefix="run-sys-prop."/>
jaroslav@413
   919
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jaroslav@413
   920
                    </syspropertyset>
jaroslav@413
   921
                    <customize/>
jaroslav@413
   922
                </java>
jaroslav@413
   923
            </sequential>
jaroslav@413
   924
        </macrodef>
jaroslav@413
   925
    </target>
jaroslav@413
   926
    <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
jaroslav@413
   927
        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
jaroslav@413
   928
            <attribute default="" name="modulename"/>
jaroslav@413
   929
            <attribute default="${main.class}" name="classname"/>
jaroslav@413
   930
            <attribute default="${run.modulepath}" name="modulepath"/>
jaroslav@413
   931
            <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
jaroslav@413
   932
            <attribute default="${run.classpath}" name="classpath"/>
jaroslav@413
   933
            <attribute default="jvm" name="jvm"/>
jaroslav@413
   934
            <element name="customize" optional="true"/>
jaroslav@413
   935
            <sequential>
jaroslav@413
   936
                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
jaroslav@413
   937
                    <classpath>
jaroslav@413
   938
                        <path path="@{classpath}"/>
jaroslav@413
   939
                    </classpath>
jaroslav@413
   940
                    <modulepath>
jaroslav@413
   941
                        <path path="@{modulepath}"/>
jaroslav@413
   942
                    </modulepath>
jaroslav@413
   943
                    <upgrademodulepath>
jaroslav@413
   944
                        <path path="@{upgrademodulepath}"/>
jaroslav@413
   945
                    </upgrademodulepath>
jaroslav@413
   946
                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
jaroslav@413
   947
                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
jaroslav@413
   948
                    <jvmarg line="${run.jvmargs}"/>
jaroslav@413
   949
                    <jvmarg line="${run.jvmargs.ide}"/>
jaroslav@413
   950
                    <syspropertyset>
jaroslav@413
   951
                        <propertyref prefix="run-sys-prop."/>
jaroslav@413
   952
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jaroslav@413
   953
                    </syspropertyset>
jaroslav@413
   954
                    <customize/>
jaroslav@413
   955
                </java>
jaroslav@413
   956
            </sequential>
jaroslav@413
   957
        </macrodef>
jaroslav@413
   958
    </target>
jaroslav@413
   959
    <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
jaroslav@413
   960
        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
jaroslav@413
   961
            <attribute default="" name="modulename"/>
jaroslav@413
   962
            <attribute default="${main.class}" name="classname"/>
jaroslav@413
   963
            <attribute default="" name="modulepath"/>
jaroslav@413
   964
            <attribute default="${run.classpath}" name="classpath"/>
jaroslav@413
   965
            <attribute default="jvm" name="jvm"/>
jaroslav@413
   966
            <element name="customize" optional="true"/>
jaroslav@413
   967
            <sequential>
jaroslav@413
   968
                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
jaroslav@413
   969
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
jaroslav@413
   970
                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
jaroslav@413
   971
                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
jaroslav@413
   972
                    <jvmarg line="${run.jvmargs}"/>
jaroslav@413
   973
                    <jvmarg line="${run.jvmargs.ide}"/>
jtulach@70
   974
                    <classpath>
jtulach@70
   975
                        <path path="@{classpath}"/>
jtulach@70
   976
                    </classpath>
jtulach@70
   977
                    <syspropertyset>
jtulach@70
   978
                        <propertyref prefix="run-sys-prop."/>
jtulach@70
   979
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jtulach@70
   980
                    </syspropertyset>
jtulach@70
   981
                    <customize/>
jtulach@70
   982
                </java>
jtulach@70
   983
            </sequential>
jtulach@70
   984
        </macrodef>
jtulach@70
   985
    </target>
jaroslav@413
   986
    <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
jaroslav@413
   987
    <target name="-init-macrodef-copylibs">
jaroslav@413
   988
        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
jaroslav@413
   989
            <attribute default="${manifest.file}" name="manifest"/>
jtulach@70
   990
            <element name="customize" optional="true"/>
jtulach@70
   991
            <sequential>
jaroslav@413
   992
                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jaroslav@413
   993
                <pathconvert property="run.classpath.without.build.classes.dir">
jaroslav@413
   994
                    <path path="${run.classpath}"/>
jaroslav@413
   995
                    <map from="${build.classes.dir.resolved}" to=""/>
jaroslav@413
   996
                </pathconvert>
jaroslav@413
   997
                <pathconvert pathsep=" " property="jar.classpath">
jaroslav@413
   998
                    <path path="${run.classpath.without.build.classes.dir}"/>
jaroslav@413
   999
                    <chainedmapper>
jaroslav@413
  1000
                        <flattenmapper/>
jaroslav@413
  1001
                        <filtermapper>
jaroslav@413
  1002
                            <replacestring from=" " to="%20"/>
jaroslav@413
  1003
                        </filtermapper>
jaroslav@413
  1004
                        <globmapper from="*" to="lib/*"/>
jaroslav@413
  1005
                    </chainedmapper>
jaroslav@413
  1006
                </pathconvert>
jaroslav@413
  1007
                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
jaroslav@413
  1008
                <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
jaroslav@413
  1009
                    <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
jaroslav@413
  1010
                    <manifest>
jaroslav@413
  1011
                        <attribute name="Class-Path" value="${jar.classpath}"/>
jaroslav@413
  1012
                        <customize/>
jaroslav@413
  1013
                    </manifest>
jaroslav@413
  1014
                </copylibs>
jtulach@70
  1015
            </sequential>
jtulach@70
  1016
        </macrodef>
jtulach@70
  1017
    </target>
jtulach@70
  1018
    <target name="-init-presetdef-jar">
jtulach@70
  1019
        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
jaroslav@413
  1020
            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
jaroslav@413
  1021
                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
jtulach@70
  1022
            </jar>
jtulach@70
  1023
        </presetdef>
jtulach@70
  1024
    </target>
jaroslav@413
  1025
    <target name="-init-ap-cmdline-properties">
jaroslav@413
  1026
        <property name="annotation.processing.enabled" value="true"/>
jaroslav@413
  1027
        <property name="annotation.processing.processors.list" value=""/>
jaroslav@413
  1028
        <property name="annotation.processing.processor.options" value=""/>
jaroslav@413
  1029
        <property name="annotation.processing.run.all.processors" value="true"/>
jaroslav@413
  1030
        <property name="javac.processorpath" value="${javac.classpath}"/>
jaroslav@413
  1031
        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
jaroslav@413
  1032
        <condition property="ap.supported.internal" value="true">
jaroslav@413
  1033
            <not>
jaroslav@413
  1034
                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
jaroslav@413
  1035
            </not>
jaroslav@413
  1036
        </condition>
jaroslav@413
  1037
    </target>
jaroslav@413
  1038
    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
jaroslav@413
  1039
        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
jaroslav@413
  1040
            <isfalse value="${annotation.processing.run.all.processors}"/>
jaroslav@413
  1041
        </condition>
jaroslav@413
  1042
        <condition else="" property="ap.proc.none.internal" value="-proc:none">
jaroslav@413
  1043
            <isfalse value="${annotation.processing.enabled}"/>
jaroslav@413
  1044
        </condition>
jaroslav@413
  1045
    </target>
jaroslav@413
  1046
    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
jaroslav@413
  1047
        <property name="ap.cmd.line.internal" value=""/>
jaroslav@413
  1048
    </target>
jaroslav@413
  1049
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
jtulach@70
  1050
    <!--
jtulach@70
  1051
                ===================
jtulach@70
  1052
                COMPILATION SECTION
jtulach@70
  1053
                ===================
jtulach@70
  1054
            -->
jaroslav@413
  1055
    <target name="-deps-jar-init" unless="built-jar.properties">
jaroslav@413
  1056
        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
jaroslav@413
  1057
        <delete file="${built-jar.properties}" quiet="true"/>
jaroslav@413
  1058
    </target>
jaroslav@413
  1059
    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
jaroslav@413
  1060
        <echo level="warn" message="Cycle detected: hellowithsubclassing was already built"/>
jaroslav@413
  1061
    </target>
jaroslav@413
  1062
    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
jaroslav@413
  1063
        <mkdir dir="${build.dir}"/>
jaroslav@413
  1064
        <touch file="${built-jar.properties}" verbose="false"/>
jaroslav@413
  1065
        <property file="${built-jar.properties}" prefix="already.built.jar."/>
jaroslav@413
  1066
        <antcall target="-warn-already-built-jar"/>
jaroslav@413
  1067
        <propertyfile file="${built-jar.properties}">
jaroslav@413
  1068
            <entry key="${basedir}" value=""/>
jaroslav@413
  1069
        </propertyfile>
jaroslav@413
  1070
    </target>
jaroslav@413
  1071
    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
jaroslav@413
  1072
    <target depends="init" name="-check-automatic-build">
jaroslav@413
  1073
        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
jaroslav@413
  1074
    </target>
jaroslav@413
  1075
    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
jaroslav@413
  1076
        <antcall target="clean">
jaroslav@413
  1077
            <param name="no.dependencies" value="true"/>
jaroslav@413
  1078
        </antcall>
jaroslav@413
  1079
    </target>
jtulach@70
  1080
    <target depends="init,deps-jar" name="-pre-pre-compile">
jtulach@70
  1081
        <mkdir dir="${build.classes.dir}"/>
jtulach@70
  1082
    </target>
jtulach@70
  1083
    <target name="-pre-compile">
jtulach@70
  1084
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1085
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1086
    </target>
jtulach@70
  1087
    <target if="do.depend.true" name="-compile-depend">
jaroslav@413
  1088
        <pathconvert property="build.generated.subdirs">
jaroslav@413
  1089
            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
jaroslav@413
  1090
                <include name="*"/>
jaroslav@413
  1091
            </dirset>
jaroslav@413
  1092
        </pathconvert>
jaroslav@413
  1093
        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
jtulach@70
  1094
    </target>
jaroslav@413
  1095
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
jaroslav@413
  1096
        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
jtulach@70
  1097
        <copy todir="${build.classes.dir}">
jtulach@70
  1098
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@70
  1099
        </copy>
jtulach@70
  1100
    </target>
jaroslav@413
  1101
    <target if="has.persistence.xml" name="-copy-persistence-xml">
jaroslav@413
  1102
        <mkdir dir="${build.classes.dir}/META-INF"/>
jaroslav@413
  1103
        <copy todir="${build.classes.dir}/META-INF">
jaroslav@413
  1104
            <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
jaroslav@413
  1105
        </copy>
jaroslav@413
  1106
    </target>
jtulach@70
  1107
    <target name="-post-compile">
jtulach@70
  1108
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1109
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1110
    </target>
jaroslav@413
  1111
    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
jtulach@70
  1112
    <target name="-pre-compile-single">
jtulach@70
  1113
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1114
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1115
    </target>
jtulach@70
  1116
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
jtulach@70
  1117
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
jtulach@70
  1118
        <j2seproject3:force-recompile/>
jaroslav@413
  1119
        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
jtulach@70
  1120
    </target>
jtulach@70
  1121
    <target name="-post-compile-single">
jtulach@70
  1122
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1123
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1124
    </target>
jaroslav@413
  1125
    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
jtulach@70
  1126
    <!--
jtulach@70
  1127
                ====================
jtulach@70
  1128
                JAR BUILDING SECTION
jtulach@70
  1129
                ====================
jtulach@70
  1130
            -->
jtulach@70
  1131
    <target depends="init" name="-pre-pre-jar">
jtulach@70
  1132
        <dirname file="${dist.jar}" property="dist.jar.dir"/>
jtulach@70
  1133
        <mkdir dir="${dist.jar.dir}"/>
jtulach@70
  1134
    </target>
jtulach@70
  1135
    <target name="-pre-jar">
jtulach@70
  1136
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1137
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1138
    </target>
jaroslav@413
  1139
    <target depends="init,compile" name="-check-module-main-class">
jaroslav@413
  1140
        <pathconvert property="main.class.file">
jaroslav@413
  1141
            <string value="${main.class}"/>
jaroslav@413
  1142
            <unpackagemapper from="*" to="*.class"/>
jaroslav@413
  1143
        </pathconvert>
jaroslav@413
  1144
        <condition property="do.module.main.class">
jaroslav@413
  1145
            <and>
jaroslav@413
  1146
                <isset property="main.class.available"/>
jaroslav@413
  1147
                <available file="${build.classes.dir}/module-info.class"/>
jaroslav@413
  1148
                <available file="${build.classes.dir}/${main.class.file}"/>
jaroslav@413
  1149
                <isset property="libs.CopyLibs.classpath"/>
jaroslav@413
  1150
                <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
jaroslav@413
  1151
            </and>
jaroslav@413
  1152
        </condition>
jtulach@70
  1153
    </target>
jaroslav@413
  1154
    <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
jaroslav@413
  1155
        <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
jaroslav@413
  1156
        <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
jtulach@70
  1157
    </target>
jaroslav@413
  1158
    <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
jaroslav@413
  1159
        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
jaroslav@413
  1160
        <touch file="${tmp.manifest.file}" verbose="false"/>
jaroslav@413
  1161
    </target>
jaroslav@413
  1162
    <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
jaroslav@413
  1163
        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
jaroslav@413
  1164
        <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
jaroslav@413
  1165
    </target>
jaroslav@413
  1166
    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
jaroslav@413
  1167
        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
jaroslav@413
  1168
            <attribute name="Main-Class" value="${main.class}"/>
jaroslav@413
  1169
        </manifest>
jaroslav@413
  1170
    </target>
jaroslav@413
  1171
    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
jaroslav@413
  1172
        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
jaroslav@413
  1173
            <attribute name="Profile" value="${javac.profile}"/>
jaroslav@413
  1174
        </manifest>
jaroslav@413
  1175
    </target>
jaroslav@413
  1176
    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
jaroslav@413
  1177
        <basename file="${application.splash}" property="splashscreen.basename"/>
jaroslav@413
  1178
        <mkdir dir="${build.classes.dir}/META-INF"/>
jaroslav@413
  1179
        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
jaroslav@413
  1180
        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
jaroslav@413
  1181
            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
jaroslav@413
  1182
        </manifest>
jaroslav@413
  1183
    </target>
jaroslav@413
  1184
    <target depends="init,compile" name="-check-do-mkdist">
jaroslav@413
  1185
        <condition property="do.mkdist">
jaroslav@413
  1186
            <and>
jaroslav@413
  1187
                <isset property="do.archive"/>
jaroslav@413
  1188
                <isset property="libs.CopyLibs.classpath"/>
jaroslav@413
  1189
                <not>
jaroslav@413
  1190
                    <istrue value="${mkdist.disabled}"/>
jaroslav@413
  1191
                </not>
jaroslav@413
  1192
                <not>
jaroslav@413
  1193
                    <available file="${build.classes.dir}/module-info.class"/>
jaroslav@413
  1194
                </not>
jaroslav@413
  1195
            </and>
jaroslav@413
  1196
        </condition>
jaroslav@413
  1197
    </target>
jaroslav@413
  1198
    <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,-check-do-mkdist" if="do.mkdist" name="-do-jar-copylibs">
jaroslav@413
  1199
        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
jaroslav@413
  1200
        <echo level="info">To run this application from the command line without Ant, try:</echo>
jaroslav@413
  1201
        <property location="${dist.jar}" name="dist.jar.resolved"/>
jaroslav@413
  1202
        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
jaroslav@413
  1203
    </target>
jaroslav@413
  1204
    <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,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
jaroslav@413
  1205
        <j2seproject1:jar manifest="${tmp.manifest.file}"/>
jtulach@70
  1206
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@70
  1207
        <property location="${dist.jar}" name="dist.jar.resolved"/>
jaroslav@413
  1208
        <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
jaroslav@413
  1209
            <isset property="named.module.internal"/>
jaroslav@413
  1210
        </condition>
jtulach@70
  1211
        <pathconvert property="run.classpath.with.dist.jar">
jtulach@70
  1212
            <path path="${run.classpath}"/>
jaroslav@413
  1213
            <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
jaroslav@413
  1214
        </pathconvert>
jaroslav@413
  1215
        <pathconvert property="run.modulepath.with.dist.jar">
jaroslav@413
  1216
            <path location="${dist.jar.resolved}"/>
jaroslav@413
  1217
            <path path="${run.modulepath}"/>
jtulach@70
  1218
            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
jtulach@70
  1219
        </pathconvert>
jaroslav@413
  1220
        <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
jaroslav@413
  1221
            <isset property="named.module.internal"/>
jaroslav@413
  1222
        </condition>
jaroslav@413
  1223
        <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
jaroslav@413
  1224
            <and>
jaroslav@413
  1225
                <isset property="modules.supported.internal"/>
jaroslav@413
  1226
                <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
jaroslav@413
  1227
            </and>
jaroslav@413
  1228
        </condition>
jaroslav@413
  1229
        <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
jaroslav@413
  1230
            <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
jaroslav@413
  1231
        </condition>
jaroslav@413
  1232
        <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
jaroslav@413
  1233
            <isset property="do.module.main.class"/>
jaroslav@413
  1234
        </condition>
jaroslav@413
  1235
        <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
jaroslav@413
  1236
            <isset property="named.module.internal"/>
jaroslav@413
  1237
        </condition>
jaroslav@413
  1238
        <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}">
jaroslav@413
  1239
            <isset property="main.class.available"/>
jaroslav@413
  1240
        </condition>
jaroslav@413
  1241
        <condition else="debug" property="jar.usage.level" value="info">
jaroslav@413
  1242
            <isset property="main.class.available"/>
jaroslav@413
  1243
        </condition>
jaroslav@413
  1244
        <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
jtulach@70
  1245
    </target>
jaroslav@413
  1246
    <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
jaroslav@413
  1247
        <delete>
jaroslav@413
  1248
            <fileset file="${tmp.manifest.file}"/>
jaroslav@413
  1249
        </delete>
jtulach@70
  1250
    </target>
jaroslav@413
  1251
    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
jaroslav@413
  1252
    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
jtulach@70
  1253
    <target name="-post-jar">
jtulach@70
  1254
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1255
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1256
    </target>
jaroslav@413
  1257
    <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
jaroslav@413
  1258
    <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
jaroslav@413
  1259
    <!--
jaroslav@413
  1260
                =================
jaroslav@413
  1261
                DEPLOY SECTION
jaroslav@413
  1262
                =================
jaroslav@413
  1263
            -->
jaroslav@413
  1264
    <target name="-pre-deploy">
jaroslav@413
  1265
        <!-- Empty placeholder for easier customization. -->
jaroslav@413
  1266
        <!-- You can override this target in the ../build.xml file. -->
jaroslav@413
  1267
    </target>
jaroslav@413
  1268
    <target depends="init" name="-check-jlink">
jaroslav@413
  1269
        <condition property="do.jlink.internal">
jaroslav@413
  1270
            <and>
jaroslav@413
  1271
                <istrue value="${do.jlink}"/>
jaroslav@413
  1272
                <isset property="do.archive"/>
jaroslav@413
  1273
                <isset property="named.module.internal"/>
jaroslav@413
  1274
            </and>
jaroslav@413
  1275
        </condition>
jaroslav@413
  1276
    </target>
jaroslav@413
  1277
    <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
jaroslav@413
  1278
        <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
jaroslav@413
  1279
        <property name="jlink.launcher.name" value="${application.title}"/>
jaroslav@413
  1280
        <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
jaroslav@413
  1281
            <and>
jaroslav@413
  1282
                <isset property="jlink.additionalmodules"/>
jaroslav@413
  1283
                <length length="0" string="${jlink.additionalmodules}" when="greater"/>
jaroslav@413
  1284
            </and>
jaroslav@413
  1285
        </condition>
jaroslav@413
  1286
        <condition property="jlink.do.strip.internal">
jaroslav@413
  1287
            <and>
jaroslav@413
  1288
                <isset property="jlink.strip"/>
jaroslav@413
  1289
                <istrue value="${jlink.strip}"/>
jaroslav@413
  1290
            </and>
jaroslav@413
  1291
        </condition>
jaroslav@413
  1292
        <condition property="jlink.do.additionalparam.internal">
jaroslav@413
  1293
            <and>
jaroslav@413
  1294
                <isset property="jlink.additionalparam"/>
jaroslav@413
  1295
                <length length="0" string="${jlink.additionalparam}" when="greater"/>
jaroslav@413
  1296
            </and>
jaroslav@413
  1297
        </condition>
jaroslav@413
  1298
        <condition property="jlink.do.launcher.internal">
jaroslav@413
  1299
            <and>
jaroslav@413
  1300
                <istrue value="${jlink.launcher}"/>
jaroslav@413
  1301
                <isset property="main.class.available"/>
jaroslav@413
  1302
            </and>
jaroslav@413
  1303
        </condition>
jaroslav@413
  1304
        <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
jaroslav@413
  1305
        <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
jaroslav@413
  1306
        <exec executable="${platform.jlink}">
jaroslav@413
  1307
            <arg value="--module-path"/>
jaroslav@413
  1308
            <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
jaroslav@413
  1309
            <arg value="--add-modules"/>
jaroslav@413
  1310
            <arg value="${jlink.add.modules}"/>
jaroslav@413
  1311
            <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
jaroslav@413
  1312
            <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
jaroslav@413
  1313
            <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
jaroslav@413
  1314
            <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
jaroslav@413
  1315
            <arg value="--output"/>
jaroslav@413
  1316
            <arg value="${dist.jlink.output}"/>
jaroslav@413
  1317
        </exec>
jaroslav@413
  1318
    </target>
jaroslav@413
  1319
    <target name="-post-deploy">
jaroslav@413
  1320
        <!-- Empty placeholder for easier customization. -->
jaroslav@413
  1321
        <!-- You can override this target in the ../build.xml file. -->
jaroslav@413
  1322
    </target>
jaroslav@413
  1323
    <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
jtulach@70
  1324
    <!--
jtulach@70
  1325
                =================
jtulach@70
  1326
                EXECUTION SECTION
jtulach@70
  1327
                =================
jtulach@70
  1328
            -->
jtulach@70
  1329
    <target depends="init,compile" description="Run a main class." name="run">
jtulach@70
  1330
        <j2seproject1:java>
jtulach@70
  1331
            <customize>
jtulach@70
  1332
                <arg line="${application.args}"/>
jtulach@70
  1333
            </customize>
jtulach@70
  1334
        </j2seproject1:java>
jtulach@70
  1335
    </target>
jtulach@70
  1336
    <target name="-do-not-recompile">
jtulach@70
  1337
        <property name="javac.includes.binary" value=""/>
jtulach@70
  1338
    </target>
jaroslav@413
  1339
    <target depends="init,compile-single" name="run-single">
jtulach@70
  1340
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jtulach@70
  1341
        <j2seproject1:java classname="${run.class}"/>
jtulach@70
  1342
    </target>
jaroslav@413
  1343
    <target depends="init,compile-test-single" name="run-test-with-main">
jaroslav@413
  1344
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jaroslav@413
  1345
        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
jaroslav@413
  1346
    </target>
jtulach@70
  1347
    <!--
jtulach@70
  1348
                =================
jtulach@70
  1349
                DEBUGGING SECTION
jtulach@70
  1350
                =================
jtulach@70
  1351
            -->
jtulach@70
  1352
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
jtulach@70
  1353
        <j2seproject1:nbjpdastart name="${debug.class}"/>
jtulach@70
  1354
    </target>
jaroslav@413
  1355
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
jaroslav@413
  1356
        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
jaroslav@413
  1357
    </target>
jtulach@70
  1358
    <target depends="init,compile" name="-debug-start-debuggee">
jtulach@70
  1359
        <j2seproject3:debug>
jaroslav@413
  1360
            <customizeDebuggee>
jtulach@70
  1361
                <arg line="${application.args}"/>
jaroslav@413
  1362
            </customizeDebuggee>
jtulach@70
  1363
        </j2seproject3:debug>
jtulach@70
  1364
    </target>
jtulach@70
  1365
    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
jtulach@70
  1366
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
jtulach@70
  1367
        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
jtulach@70
  1368
    </target>
jtulach@70
  1369
    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
jtulach@70
  1370
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
jtulach@70
  1371
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
jtulach@70
  1372
        <j2seproject3:debug classname="${debug.class}"/>
jtulach@70
  1373
    </target>
jaroslav@413
  1374
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
jaroslav@413
  1375
    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
jaroslav@413
  1376
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
jaroslav@413
  1377
        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
jaroslav@413
  1378
    </target>
jaroslav@413
  1379
    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
jtulach@70
  1380
    <target depends="init" name="-pre-debug-fix">
jtulach@70
  1381
        <fail unless="fix.includes">Must set fix.includes</fail>
jtulach@70
  1382
        <property name="javac.includes" value="${fix.includes}.java"/>
jtulach@70
  1383
    </target>
jtulach@70
  1384
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
jtulach@70
  1385
        <j2seproject1:nbjpdareload/>
jtulach@70
  1386
    </target>
jtulach@70
  1387
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
jtulach@70
  1388
    <!--
jaroslav@413
  1389
                =================
jaroslav@413
  1390
                PROFILING SECTION
jaroslav@413
  1391
                =================
jaroslav@413
  1392
            -->
jaroslav@413
  1393
    <!--
jaroslav@413
  1394
                pre NB7.2 profiler integration
jaroslav@413
  1395
            -->
jaroslav@413
  1396
    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
jaroslav@413
  1397
        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
jaroslav@413
  1398
        <nbprofiledirect>
jaroslav@413
  1399
            <classpath>
jaroslav@413
  1400
                <path path="${run.classpath}"/>
jaroslav@413
  1401
            </classpath>
jaroslav@413
  1402
        </nbprofiledirect>
jaroslav@413
  1403
        <profile/>
jaroslav@413
  1404
    </target>
jaroslav@413
  1405
    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
jaroslav@413
  1406
        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
jaroslav@413
  1407
        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
jaroslav@413
  1408
        <nbprofiledirect>
jaroslav@413
  1409
            <classpath>
jaroslav@413
  1410
                <path path="${run.classpath}"/>
jaroslav@413
  1411
            </classpath>
jaroslav@413
  1412
        </nbprofiledirect>
jaroslav@413
  1413
        <profile classname="${profile.class}"/>
jaroslav@413
  1414
    </target>
jaroslav@413
  1415
    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
jaroslav@413
  1416
        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
jaroslav@413
  1417
        <nbprofiledirect>
jaroslav@413
  1418
            <classpath>
jaroslav@413
  1419
                <path path="${run.classpath}"/>
jaroslav@413
  1420
            </classpath>
jaroslav@413
  1421
        </nbprofiledirect>
jaroslav@413
  1422
        <profile classname="sun.applet.AppletViewer">
jaroslav@413
  1423
            <customize>
jaroslav@413
  1424
                <arg value="${applet.url}"/>
jaroslav@413
  1425
            </customize>
jaroslav@413
  1426
        </profile>
jaroslav@413
  1427
    </target>
jaroslav@413
  1428
    <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
jaroslav@413
  1429
        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
jaroslav@413
  1430
        <nbprofiledirect>
jaroslav@413
  1431
            <classpath>
jaroslav@413
  1432
                <path path="${run.test.classpath}"/>
jaroslav@413
  1433
            </classpath>
jaroslav@413
  1434
        </nbprofiledirect>
jaroslav@413
  1435
        <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
jaroslav@413
  1436
            <customize>
jaroslav@413
  1437
                <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
jaroslav@413
  1438
                <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
jaroslav@413
  1439
                <jvmarg value="${profiler.info.jvmargs.agent}"/>
jaroslav@413
  1440
                <jvmarg line="${profiler.info.jvmargs}"/>
jaroslav@413
  1441
                <classpath>
jaroslav@413
  1442
                    <path path="${run.test.classpath}"/>
jaroslav@413
  1443
                </classpath>
jaroslav@413
  1444
            </customize>
jaroslav@413
  1445
        </j2seproject3:junit>
jaroslav@413
  1446
    </target>
jaroslav@413
  1447
    <!--
jaroslav@413
  1448
                end of pre NB72 profiling section
jaroslav@413
  1449
            -->
jaroslav@413
  1450
    <target if="netbeans.home" name="-profile-check">
jaroslav@413
  1451
        <condition property="profiler.configured">
jaroslav@413
  1452
            <or>
jaroslav@413
  1453
                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
jaroslav@413
  1454
                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
jaroslav@413
  1455
            </or>
jaroslav@413
  1456
        </condition>
jaroslav@413
  1457
    </target>
jaroslav@413
  1458
    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
jaroslav@413
  1459
        <startprofiler/>
jaroslav@413
  1460
        <antcall target="run"/>
jaroslav@413
  1461
    </target>
jaroslav@413
  1462
    <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
jaroslav@413
  1463
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jaroslav@413
  1464
        <startprofiler/>
jaroslav@413
  1465
        <antcall target="run-single"/>
jaroslav@413
  1466
    </target>
jaroslav@413
  1467
    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
jaroslav@413
  1468
    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
jaroslav@413
  1469
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
jaroslav@413
  1470
        <startprofiler/>
jaroslav@413
  1471
        <antcall target="test-single"/>
jaroslav@413
  1472
    </target>
jaroslav@413
  1473
    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
jaroslav@413
  1474
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jaroslav@413
  1475
        <startprofiler/>
jaroslav@413
  1476
        <antcall target="run-test-with-main"/>
jaroslav@413
  1477
    </target>
jaroslav@413
  1478
    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
jaroslav@413
  1479
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jaroslav@413
  1480
        <startprofiler/>
jaroslav@413
  1481
        <antcall target="run-applet"/>
jaroslav@413
  1482
    </target>
jaroslav@413
  1483
    <!--
jtulach@70
  1484
                ===============
jtulach@70
  1485
                JAVADOC SECTION
jtulach@70
  1486
                ===============
jtulach@70
  1487
            -->
jaroslav@413
  1488
    <target depends="init" if="have.sources" name="-javadoc-build">
jtulach@70
  1489
        <mkdir dir="${dist.javadoc.dir}"/>
jaroslav@413
  1490
        <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
jaroslav@413
  1491
            <and>
jaroslav@413
  1492
                <isset property="endorsed.classpath.cmd.line.arg"/>
jaroslav@413
  1493
                <not>
jaroslav@413
  1494
                    <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
jaroslav@413
  1495
                </not>
jaroslav@413
  1496
            </and>
jaroslav@413
  1497
        </condition>
jaroslav@413
  1498
        <condition else="" property="bug5101868workaround" value="*.java">
jaroslav@413
  1499
            <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
jaroslav@413
  1500
        </condition>
jaroslav@413
  1501
        <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
jaroslav@413
  1502
            <and>
jaroslav@413
  1503
                <isset property="javadoc.html5"/>
jaroslav@413
  1504
                <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
jaroslav@413
  1505
            </and>
jaroslav@413
  1506
        </condition>
jaroslav@413
  1507
        <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
jtulach@70
  1508
            <classpath>
jtulach@70
  1509
                <path path="${javac.classpath}"/>
jtulach@70
  1510
            </classpath>
jaroslav@413
  1511
            <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
jtulach@70
  1512
                <filename name="**/*.java"/>
jtulach@70
  1513
            </fileset>
jaroslav@413
  1514
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
jaroslav@413
  1515
                <include name="**/*.java"/>
jaroslav@413
  1516
                <exclude name="*.java"/>
jaroslav@413
  1517
            </fileset>
jaroslav@413
  1518
            <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
jaroslav@413
  1519
            <arg line="${javadoc.html5.cmd.line.arg}"/>
jtulach@70
  1520
        </javadoc>
jaroslav@413
  1521
        <copy todir="${dist.javadoc.dir}">
jaroslav@413
  1522
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
jaroslav@413
  1523
                <filename name="**/doc-files/**"/>
jaroslav@413
  1524
            </fileset>
jaroslav@413
  1525
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
jaroslav@413
  1526
                <include name="**/doc-files/**"/>
jaroslav@413
  1527
            </fileset>
jaroslav@413
  1528
        </copy>
jtulach@70
  1529
    </target>
jtulach@70
  1530
    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
jtulach@70
  1531
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
jtulach@70
  1532
    </target>
jtulach@70
  1533
    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
jtulach@70
  1534
    <!--
jtulach@70
  1535
                =========================
jaroslav@413
  1536
                TEST COMPILATION SECTION
jtulach@70
  1537
                =========================
jtulach@70
  1538
            -->
jtulach@70
  1539
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
jtulach@70
  1540
        <mkdir dir="${build.test.classes.dir}"/>
jtulach@70
  1541
    </target>
jtulach@70
  1542
    <target name="-pre-compile-test">
jtulach@70
  1543
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1544
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1545
    </target>
jaroslav@413
  1546
    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
jaroslav@413
  1547
        <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
jaroslav@413
  1548
        <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
jaroslav@413
  1549
            <and>
jaroslav@413
  1550
                <isset property="test.module.name"/>
jaroslav@413
  1551
                <length length="0" string="${test.module.name}" when="greater"/>
jaroslav@413
  1552
            </and>
jaroslav@413
  1553
        </condition>
jaroslav@413
  1554
        <condition else="--patch-module ${module.name}=${test.src.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
jaroslav@413
  1555
            <and>
jaroslav@413
  1556
                <isset property="test.module.name"/>
jaroslav@413
  1557
                <length length="0" string="${test.module.name}" when="greater"/>
jaroslav@413
  1558
            </and>
jaroslav@413
  1559
        </condition>
jaroslav@413
  1560
    </target>
jaroslav@413
  1561
    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
jaroslav@413
  1562
        <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
jaroslav@413
  1563
            <and>
jaroslav@413
  1564
                <isset property="test.module.name"/>
jaroslav@413
  1565
                <length length="0" string="${test.module.name}" when="greater"/>
jaroslav@413
  1566
            </and>
jaroslav@413
  1567
        </condition>
jaroslav@413
  1568
        <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
jaroslav@413
  1569
        <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
jaroslav@413
  1570
        <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
jaroslav@413
  1571
            <chainedmapper>
jaroslav@413
  1572
                <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
jaroslav@413
  1573
                <filtermapper>
jaroslav@413
  1574
                    <uniqfilter/>
jaroslav@413
  1575
                    <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
jaroslav@413
  1576
                </filtermapper>
jaroslav@413
  1577
                <cutdirsmapper dirs="1"/>
jaroslav@413
  1578
                <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
jaroslav@413
  1579
            </chainedmapper>
jaroslav@413
  1580
        </pathconvert>
jaroslav@413
  1581
        <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}">
jaroslav@413
  1582
            <and>
jaroslav@413
  1583
                <isset property="test.module.name"/>
jaroslav@413
  1584
                <length length="0" string="${test.module.name}" when="greater"/>
jaroslav@413
  1585
            </and>
jaroslav@413
  1586
        </condition>
jaroslav@413
  1587
    </target>
jaroslav@413
  1588
    <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
jaroslav@413
  1589
        <property name="javac.test.sourcepath" value="${empty.dir}"/>
jaroslav@413
  1590
        <property name="javac.test.compilerargs" value=""/>
jaroslav@413
  1591
        <property name="run.test.jvmargs" value=""/>
jaroslav@413
  1592
    </target>
jaroslav@413
  1593
    <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
jtulach@70
  1594
    <target if="do.depend.true" name="-compile-test-depend">
jtulach@70
  1595
        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
jtulach@70
  1596
    </target>
jaroslav@413
  1597
    <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
jaroslav@413
  1598
        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.src.dir}">
jaroslav@413
  1599
            <customize>
jaroslav@413
  1600
                <compilerarg line="${javac.test.compilerargs}"/>
jaroslav@413
  1601
            </customize>
jaroslav@413
  1602
        </j2seproject3:javac>
jtulach@70
  1603
        <copy todir="${build.test.classes.dir}">
jtulach@70
  1604
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@70
  1605
        </copy>
jtulach@70
  1606
    </target>
jtulach@70
  1607
    <target name="-post-compile-test">
jtulach@70
  1608
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1609
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1610
    </target>
jtulach@70
  1611
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
jtulach@70
  1612
    <target name="-pre-compile-test-single">
jtulach@70
  1613
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1614
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1615
    </target>
jaroslav@413
  1616
    <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
jtulach@70
  1617
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
jtulach@70
  1618
        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
jaroslav@413
  1619
        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}">
jaroslav@413
  1620
            <customize>
jaroslav@413
  1621
                <compilerarg line="${javac.test.compilerargs}"/>
jaroslav@413
  1622
            </customize>
jaroslav@413
  1623
        </j2seproject3:javac>
jtulach@70
  1624
        <copy todir="${build.test.classes.dir}">
jtulach@70
  1625
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@70
  1626
        </copy>
jtulach@70
  1627
    </target>
jtulach@70
  1628
    <target name="-post-compile-test-single">
jtulach@70
  1629
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1630
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1631
    </target>
jtulach@70
  1632
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
jtulach@70
  1633
    <!--
jtulach@70
  1634
                =======================
jaroslav@413
  1635
                TEST EXECUTION SECTION
jtulach@70
  1636
                =======================
jtulach@70
  1637
            -->
jtulach@70
  1638
    <target depends="init" if="have.tests" name="-pre-test-run">
jtulach@70
  1639
        <mkdir dir="${build.test.results.dir}"/>
jtulach@70
  1640
    </target>
jaroslav@413
  1641
    <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
jaroslav@413
  1642
        <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
jtulach@70
  1643
    </target>
jtulach@70
  1644
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
jaroslav@413
  1645
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
jtulach@70
  1646
    </target>
jtulach@70
  1647
    <target depends="init" if="have.tests" name="test-report"/>
jtulach@70
  1648
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
jtulach@70
  1649
    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
jtulach@70
  1650
    <target depends="init" if="have.tests" name="-pre-test-run-single">
jtulach@70
  1651
        <mkdir dir="${build.test.results.dir}"/>
jtulach@70
  1652
    </target>
jaroslav@413
  1653
    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
jtulach@70
  1654
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
jaroslav@413
  1655
        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
jtulach@70
  1656
    </target>
jtulach@70
  1657
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
jaroslav@413
  1658
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
jtulach@70
  1659
    </target>
jaroslav@413
  1660
    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
jaroslav@413
  1661
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
jaroslav@413
  1662
        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
jaroslav@413
  1663
        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
jaroslav@413
  1664
        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
jaroslav@413
  1665
    </target>
jaroslav@413
  1666
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
jaroslav@413
  1667
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
jaroslav@413
  1668
    </target>
jaroslav@413
  1669
    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
jtulach@70
  1670
    <!--
jtulach@70
  1671
                =======================
jaroslav@413
  1672
                TEST DEBUGGING SECTION
jtulach@70
  1673
                =======================
jtulach@70
  1674
            -->
jaroslav@413
  1675
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
jtulach@70
  1676
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
jaroslav@413
  1677
        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
jaroslav@413
  1678
    </target>
jaroslav@413
  1679
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
jaroslav@413
  1680
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
jaroslav@413
  1681
        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
jaroslav@413
  1682
        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
jtulach@70
  1683
    </target>
jtulach@70
  1684
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
jtulach@70
  1685
        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
jtulach@70
  1686
    </target>
jaroslav@413
  1687
    <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
jaroslav@413
  1688
    <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
jtulach@70
  1689
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
jtulach@70
  1690
        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
jtulach@70
  1691
    </target>
jtulach@70
  1692
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
jtulach@70
  1693
    <!--
jtulach@70
  1694
                =========================
jtulach@70
  1695
                APPLET EXECUTION SECTION
jtulach@70
  1696
                =========================
jtulach@70
  1697
            -->
jtulach@70
  1698
    <target depends="init,compile-single" name="run-applet">
jtulach@70
  1699
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jtulach@70
  1700
        <j2seproject1:java classname="sun.applet.AppletViewer">
jtulach@70
  1701
            <customize>
jtulach@70
  1702
                <arg value="${applet.url}"/>
jtulach@70
  1703
            </customize>
jtulach@70
  1704
        </j2seproject1:java>
jtulach@70
  1705
    </target>
jtulach@70
  1706
    <!--
jtulach@70
  1707
                =========================
jtulach@70
  1708
                APPLET DEBUGGING  SECTION
jtulach@70
  1709
                =========================
jtulach@70
  1710
            -->
jtulach@70
  1711
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
jtulach@70
  1712
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jtulach@70
  1713
        <j2seproject3:debug classname="sun.applet.AppletViewer">
jaroslav@413
  1714
            <customizeDebuggee>
jtulach@70
  1715
                <arg value="${applet.url}"/>
jaroslav@413
  1716
            </customizeDebuggee>
jtulach@70
  1717
        </j2seproject3:debug>
jtulach@70
  1718
    </target>
jtulach@70
  1719
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
jtulach@70
  1720
    <!--
jtulach@70
  1721
                ===============
jtulach@70
  1722
                CLEANUP SECTION
jtulach@70
  1723
                ===============
jtulach@70
  1724
            -->
jaroslav@413
  1725
    <target name="-deps-clean-init" unless="built-clean.properties">
jaroslav@413
  1726
        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
jaroslav@413
  1727
        <delete file="${built-clean.properties}" quiet="true"/>
jaroslav@413
  1728
    </target>
jaroslav@413
  1729
    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
jaroslav@413
  1730
        <echo level="warn" message="Cycle detected: hellowithsubclassing was already built"/>
jaroslav@413
  1731
    </target>
jaroslav@413
  1732
    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
jaroslav@413
  1733
        <mkdir dir="${build.dir}"/>
jaroslav@413
  1734
        <touch file="${built-clean.properties}" verbose="false"/>
jaroslav@413
  1735
        <property file="${built-clean.properties}" prefix="already.built.clean."/>
jaroslav@413
  1736
        <antcall target="-warn-already-built-clean"/>
jaroslav@413
  1737
        <propertyfile file="${built-clean.properties}">
jaroslav@413
  1738
            <entry key="${basedir}" value=""/>
jaroslav@413
  1739
        </propertyfile>
jaroslav@413
  1740
    </target>
jtulach@70
  1741
    <target depends="init" name="-do-clean">
jtulach@70
  1742
        <delete dir="${build.dir}"/>
jaroslav@413
  1743
        <delete dir="${dist.jlink.output}"/>
jaroslav@413
  1744
        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
jtulach@70
  1745
    </target>
jtulach@70
  1746
    <target name="-post-clean">
jtulach@70
  1747
        <!-- Empty placeholder for easier customization. -->
jtulach@70
  1748
        <!-- You can override this target in the ../build.xml file. -->
jtulach@70
  1749
    </target>
jtulach@70
  1750
    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
jaroslav@413
  1751
    <target name="-check-call-dep">
jaroslav@413
  1752
        <property file="${call.built.properties}" prefix="already.built."/>
jaroslav@413
  1753
        <condition property="should.call.dep">
jaroslav@413
  1754
            <and>
jaroslav@413
  1755
                <not>
jaroslav@413
  1756
                    <isset property="already.built.${call.subproject}"/>
jaroslav@413
  1757
                </not>
jaroslav@413
  1758
                <available file="${call.script}"/>
jaroslav@413
  1759
            </and>
jaroslav@413
  1760
        </condition>
jaroslav@413
  1761
    </target>
jaroslav@413
  1762
    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
jaroslav@413
  1763
        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
jaroslav@413
  1764
            <propertyset>
jaroslav@413
  1765
                <propertyref prefix="transfer."/>
jaroslav@413
  1766
                <mapper from="transfer.*" to="*" type="glob"/>
jaroslav@413
  1767
            </propertyset>
jaroslav@413
  1768
        </ant>
jaroslav@413
  1769
    </target>
jtulach@70
  1770
</project>