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