samples/extensibleicon/nbproject/build-impl.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Mon, 21 Dec 2009 16:54:12 +0100
changeset 340 9c1a298e51a9
parent 256 9d7d928a6b52
child 413 f11943a373a7
permissions -rw-r--r--
Fixing dependencies since the org.openide.util and org.openide.util.lookup are now separate
jtulach@89
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@89
     2
<!--
jtulach@89
     3
*** GENERATED FROM project.xml - DO NOT EDIT  ***
jtulach@89
     4
***         EDIT ../build.xml INSTEAD         ***
jtulach@89
     5
jtulach@89
     6
For the purpose of easier reading the script
jtulach@89
     7
is divided into following sections:
jtulach@89
     8
jtulach@89
     9
  - initialization
jtulach@89
    10
  - compilation
jtulach@89
    11
  - jar
jtulach@89
    12
  - execution
jtulach@89
    13
  - debugging
jtulach@89
    14
  - javadoc
jtulach@89
    15
  - junit compilation
jtulach@89
    16
  - junit execution
jtulach@89
    17
  - junit debugging
jtulach@89
    18
  - applet
jtulach@89
    19
  - cleanup
jtulach@89
    20
jtulach@89
    21
        -->
jtulach@256
    22
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="extensibleicon-impl">
jtulach@340
    23
    <fail message="Please build using Ant 1.7.1 or higher.">
jtulach@340
    24
        <condition>
jtulach@340
    25
            <not>
jtulach@340
    26
                <antversion atleast="1.7.1"/>
jtulach@340
    27
            </not>
jtulach@340
    28
        </condition>
jtulach@340
    29
    </fail>
jtulach@89
    30
    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
jtulach@89
    31
    <!-- 
jtulach@89
    32
                ======================
jtulach@89
    33
                INITIALIZATION SECTION 
jtulach@89
    34
                ======================
jtulach@89
    35
            -->
jtulach@89
    36
    <target name="-pre-init">
jtulach@89
    37
        <!-- Empty placeholder for easier customization. -->
jtulach@89
    38
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
    39
    </target>
jtulach@89
    40
    <target depends="-pre-init" name="-init-private">
jtulach@89
    41
        <property file="nbproject/private/config.properties"/>
jtulach@89
    42
        <property file="nbproject/private/configs/${config}.properties"/>
jtulach@89
    43
        <property file="nbproject/private/private.properties"/>
jtulach@89
    44
    </target>
jtulach@89
    45
    <target depends="-pre-init,-init-private" name="-init-user">
jtulach@89
    46
        <property file="${user.properties.file}"/>
jtulach@89
    47
        <!-- The two properties below are usually overridden -->
jtulach@89
    48
        <!-- by the active platform. Just a fallback. -->
jtulach@89
    49
        <property name="default.javac.source" value="1.4"/>
jtulach@89
    50
        <property name="default.javac.target" value="1.4"/>
jtulach@89
    51
    </target>
jtulach@89
    52
    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
jtulach@89
    53
        <property file="nbproject/configs/${config}.properties"/>
jtulach@89
    54
        <property file="nbproject/project.properties"/>
jtulach@89
    55
    </target>
jtulach@89
    56
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
jtulach@89
    57
        <available file="${manifest.file}" property="manifest.available"/>
jtulach@340
    58
        <condition property="main.class.available">
jtulach@89
    59
            <and>
jtulach@89
    60
                <isset property="main.class"/>
jtulach@89
    61
                <not>
jtulach@89
    62
                    <equals arg1="${main.class}" arg2="" trim="true"/>
jtulach@89
    63
                </not>
jtulach@89
    64
            </and>
jtulach@89
    65
        </condition>
jtulach@340
    66
        <condition property="manifest.available+main.class">
jtulach@340
    67
            <and>
jtulach@340
    68
                <isset property="manifest.available"/>
jtulach@340
    69
                <isset property="main.class.available"/>
jtulach@340
    70
            </and>
jtulach@340
    71
        </condition>
jtulach@340
    72
        <condition property="do.mkdist">
jtulach@340
    73
            <and>
jtulach@340
    74
                <isset property="libs.CopyLibs.classpath"/>
jtulach@340
    75
                <not>
jtulach@340
    76
                    <istrue value="${mkdist.disabled}"/>
jtulach@340
    77
                </not>
jtulach@340
    78
            </and>
jtulach@340
    79
        </condition>
jtulach@89
    80
        <condition property="manifest.available+main.class+mkdist.available">
jtulach@89
    81
            <and>
jtulach@89
    82
                <istrue value="${manifest.available+main.class}"/>
jtulach@340
    83
                <isset property="do.mkdist"/>
jtulach@89
    84
            </and>
jtulach@89
    85
        </condition>
jtulach@340
    86
        <condition property="manifest.available+mkdist.available">
jtulach@340
    87
            <and>
jtulach@340
    88
                <istrue value="${manifest.available}"/>
jtulach@340
    89
                <isset property="do.mkdist"/>
jtulach@340
    90
            </and>
jtulach@340
    91
        </condition>
jtulach@340
    92
        <condition property="manifest.available-mkdist.available">
jtulach@340
    93
            <or>
jtulach@340
    94
                <istrue value="${manifest.available}"/>
jtulach@340
    95
                <isset property="do.mkdist"/>
jtulach@340
    96
            </or>
jtulach@340
    97
        </condition>
jtulach@340
    98
        <condition property="manifest.available+main.class-mkdist.available">
jtulach@340
    99
            <or>
jtulach@340
   100
                <istrue value="${manifest.available+main.class}"/>
jtulach@340
   101
                <isset property="do.mkdist"/>
jtulach@340
   102
            </or>
jtulach@340
   103
        </condition>
jtulach@89
   104
        <condition property="have.tests">
jtulach@89
   105
            <or>
jtulach@89
   106
                <available file="${test.src.dir}"/>
jtulach@89
   107
            </or>
jtulach@89
   108
        </condition>
jtulach@89
   109
        <condition property="have.sources">
jtulach@89
   110
            <or>
jtulach@89
   111
                <available file="${src.dir}"/>
jtulach@89
   112
            </or>
jtulach@89
   113
        </condition>
jtulach@89
   114
        <condition property="netbeans.home+have.tests">
jtulach@89
   115
            <and>
jtulach@89
   116
                <isset property="netbeans.home"/>
jtulach@89
   117
                <isset property="have.tests"/>
jtulach@89
   118
            </and>
jtulach@89
   119
        </condition>
jtulach@89
   120
        <condition property="no.javadoc.preview">
jtulach@89
   121
            <and>
jtulach@89
   122
                <isset property="javadoc.preview"/>
jtulach@89
   123
                <isfalse value="${javadoc.preview}"/>
jtulach@89
   124
            </and>
jtulach@89
   125
        </condition>
jtulach@89
   126
        <property name="run.jvmargs" value=""/>
jtulach@89
   127
        <property name="javac.compilerargs" value=""/>
jtulach@89
   128
        <property name="work.dir" value="${basedir}"/>
jtulach@89
   129
        <condition property="no.deps">
jtulach@89
   130
            <and>
jtulach@89
   131
                <istrue value="${no.dependencies}"/>
jtulach@89
   132
            </and>
jtulach@89
   133
        </condition>
jtulach@89
   134
        <property name="javac.debug" value="true"/>
jtulach@89
   135
        <property name="javadoc.preview" value="true"/>
jtulach@89
   136
        <property name="application.args" value=""/>
jtulach@89
   137
        <property name="source.encoding" value="${file.encoding}"/>
jtulach@340
   138
        <property name="runtime.encoding" value="${source.encoding}"/>
jtulach@89
   139
        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
jtulach@89
   140
            <and>
jtulach@89
   141
                <isset property="javadoc.encoding"/>
jtulach@89
   142
                <not>
jtulach@89
   143
                    <equals arg1="${javadoc.encoding}" arg2=""/>
jtulach@89
   144
                </not>
jtulach@89
   145
            </and>
jtulach@89
   146
        </condition>
jtulach@89
   147
        <property name="javadoc.encoding.used" value="${source.encoding}"/>
jtulach@89
   148
        <property name="includes" value="**"/>
jtulach@89
   149
        <property name="excludes" value=""/>
jtulach@89
   150
        <property name="do.depend" value="false"/>
jtulach@89
   151
        <condition property="do.depend.true">
jtulach@89
   152
            <istrue value="${do.depend}"/>
jtulach@89
   153
        </condition>
jtulach@340
   154
        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
jtulach@340
   155
        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
jtulach@340
   156
            <length length="0" string="${endorsed.classpath}" when="greater"/>
jtulach@89
   157
        </condition>
jtulach@340
   158
        <property name="javac.fork" value="false"/>
jtulach@89
   159
    </target>
jtulach@89
   160
    <target name="-post-init">
jtulach@89
   161
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   162
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   163
    </target>
jtulach@89
   164
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
jtulach@89
   165
        <fail unless="src.dir">Must set src.dir</fail>
jtulach@89
   166
        <fail unless="test.src.dir">Must set test.src.dir</fail>
jtulach@89
   167
        <fail unless="build.dir">Must set build.dir</fail>
jtulach@89
   168
        <fail unless="dist.dir">Must set dist.dir</fail>
jtulach@89
   169
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
jtulach@89
   170
        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
jtulach@89
   171
        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
jtulach@89
   172
        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
jtulach@89
   173
        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
jtulach@89
   174
        <fail unless="dist.jar">Must set dist.jar</fail>
jtulach@89
   175
    </target>
jtulach@89
   176
    <target name="-init-macrodef-property">
jtulach@89
   177
        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@89
   178
            <attribute name="name"/>
jtulach@89
   179
            <attribute name="value"/>
jtulach@89
   180
            <sequential>
jtulach@89
   181
                <property name="@{name}" value="${@{value}}"/>
jtulach@89
   182
            </sequential>
jtulach@89
   183
        </macrodef>
jtulach@89
   184
    </target>
jtulach@89
   185
    <target name="-init-macrodef-javac">
jtulach@89
   186
        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@89
   187
            <attribute default="${src.dir}" name="srcdir"/>
jtulach@89
   188
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@89
   189
            <attribute default="${javac.classpath}" name="classpath"/>
jtulach@89
   190
            <attribute default="${includes}" name="includes"/>
jtulach@89
   191
            <attribute default="${excludes}" name="excludes"/>
jtulach@89
   192
            <attribute default="${javac.debug}" name="debug"/>
jtulach@340
   193
            <attribute default="${empty.dir}" name="sourcepath"/>
jtulach@340
   194
            <attribute default="${empty.dir}" name="gensrcdir"/>
jtulach@89
   195
            <element name="customize" optional="true"/>
jtulach@89
   196
            <sequential>
jtulach@340
   197
                <property location="${build.dir}/empty" name="empty.dir"/>
jtulach@340
   198
                <mkdir dir="${empty.dir}"/>
jtulach@340
   199
                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
jtulach@340
   200
                    <src>
jtulach@340
   201
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
jtulach@340
   202
                            <include name="*"/>
jtulach@340
   203
                        </dirset>
jtulach@340
   204
                    </src>
jtulach@89
   205
                    <classpath>
jtulach@89
   206
                        <path path="@{classpath}"/>
jtulach@89
   207
                    </classpath>
jtulach@340
   208
                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
jtulach@340
   209
                    <compilerarg line="${javac.compilerargs}"/>
jtulach@89
   210
                    <customize/>
jtulach@89
   211
                </javac>
jtulach@89
   212
            </sequential>
jtulach@89
   213
        </macrodef>
jtulach@89
   214
        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@89
   215
            <attribute default="${src.dir}" name="srcdir"/>
jtulach@89
   216
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@89
   217
            <attribute default="${javac.classpath}" name="classpath"/>
jtulach@89
   218
            <sequential>
jtulach@89
   219
                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
jtulach@89
   220
                    <classpath>
jtulach@89
   221
                        <path path="@{classpath}"/>
jtulach@89
   222
                    </classpath>
jtulach@89
   223
                </depend>
jtulach@89
   224
            </sequential>
jtulach@89
   225
        </macrodef>
jtulach@89
   226
        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@89
   227
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@89
   228
            <sequential>
jtulach@89
   229
                <fail unless="javac.includes">Must set javac.includes</fail>
jtulach@89
   230
                <pathconvert pathsep="," property="javac.includes.binary">
jtulach@89
   231
                    <path>
jtulach@89
   232
                        <filelist dir="@{destdir}" files="${javac.includes}"/>
jtulach@89
   233
                    </path>
jtulach@89
   234
                    <globmapper from="*.java" to="*.class"/>
jtulach@89
   235
                </pathconvert>
jtulach@89
   236
                <delete>
jtulach@89
   237
                    <files includes="${javac.includes.binary}"/>
jtulach@89
   238
                </delete>
jtulach@89
   239
            </sequential>
jtulach@89
   240
        </macrodef>
jtulach@89
   241
    </target>
jtulach@89
   242
    <target name="-init-macrodef-junit">
jtulach@89
   243
        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@89
   244
            <attribute default="${includes}" name="includes"/>
jtulach@89
   245
            <attribute default="${excludes}" name="excludes"/>
jtulach@89
   246
            <attribute default="**" name="testincludes"/>
jtulach@89
   247
            <sequential>
jtulach@340
   248
                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
jtulach@89
   249
                    <batchtest todir="${build.test.results.dir}">
jtulach@89
   250
                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
jtulach@89
   251
                            <filename name="@{testincludes}"/>
jtulach@89
   252
                        </fileset>
jtulach@89
   253
                    </batchtest>
jtulach@89
   254
                    <classpath>
jtulach@89
   255
                        <path path="${run.test.classpath}"/>
jtulach@89
   256
                    </classpath>
jtulach@89
   257
                    <syspropertyset>
jtulach@89
   258
                        <propertyref prefix="test-sys-prop."/>
jtulach@89
   259
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
jtulach@89
   260
                    </syspropertyset>
jtulach@89
   261
                    <formatter type="brief" usefile="false"/>
jtulach@89
   262
                    <formatter type="xml"/>
jtulach@340
   263
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
jtulach@89
   264
                    <jvmarg line="${run.jvmargs}"/>
jtulach@89
   265
                </junit>
jtulach@89
   266
            </sequential>
jtulach@89
   267
        </macrodef>
jtulach@89
   268
    </target>
jtulach@340
   269
    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
jtulach@89
   270
        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@89
   271
            <attribute default="${main.class}" name="name"/>
jtulach@89
   272
            <attribute default="${debug.classpath}" name="classpath"/>
jtulach@89
   273
            <attribute default="" name="stopclassname"/>
jtulach@89
   274
            <sequential>
jtulach@340
   275
                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
jtulach@89
   276
                    <classpath>
jtulach@89
   277
                        <path path="@{classpath}"/>
jtulach@89
   278
                    </classpath>
jtulach@89
   279
                </nbjpdastart>
jtulach@89
   280
            </sequential>
jtulach@89
   281
        </macrodef>
jtulach@89
   282
        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@89
   283
            <attribute default="${build.classes.dir}" name="dir"/>
jtulach@89
   284
            <sequential>
jtulach@89
   285
                <nbjpdareload>
jtulach@256
   286
                    <fileset dir="@{dir}" includes="${fix.classes}">
jtulach@256
   287
                        <include name="${fix.includes}*.class"/>
jtulach@256
   288
                    </fileset>
jtulach@89
   289
                </nbjpdareload>
jtulach@89
   290
            </sequential>
jtulach@89
   291
        </macrodef>
jtulach@89
   292
    </target>
jtulach@89
   293
    <target name="-init-debug-args">
jtulach@89
   294
        <property name="version-output" value="java version &quot;${ant.java.version}"/>
jtulach@89
   295
        <condition property="have-jdk-older-than-1.4">
jtulach@89
   296
            <or>
jtulach@89
   297
                <contains string="${version-output}" substring="java version &quot;1.0"/>
jtulach@89
   298
                <contains string="${version-output}" substring="java version &quot;1.1"/>
jtulach@89
   299
                <contains string="${version-output}" substring="java version &quot;1.2"/>
jtulach@89
   300
                <contains string="${version-output}" substring="java version &quot;1.3"/>
jtulach@89
   301
            </or>
jtulach@89
   302
        </condition>
jtulach@89
   303
        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
jtulach@89
   304
            <istrue value="${have-jdk-older-than-1.4}"/>
jtulach@89
   305
        </condition>
jtulach@340
   306
        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
jtulach@340
   307
            <os family="windows"/>
jtulach@340
   308
        </condition>
jtulach@340
   309
        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
jtulach@340
   310
            <isset property="debug.transport"/>
jtulach@340
   311
        </condition>
jtulach@89
   312
    </target>
jtulach@89
   313
    <target depends="-init-debug-args" name="-init-macrodef-debug">
jtulach@89
   314
        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@89
   315
            <attribute default="${main.class}" name="classname"/>
jtulach@89
   316
            <attribute default="${debug.classpath}" name="classpath"/>
jtulach@89
   317
            <element name="customize" optional="true"/>
jtulach@89
   318
            <sequential>
jtulach@89
   319
                <java classname="@{classname}" dir="${work.dir}" fork="true">
jtulach@340
   320
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
jtulach@89
   321
                    <jvmarg line="${debug-args-line}"/>
jtulach@340
   322
                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
jtulach@340
   323
                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
jtulach@340
   324
                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
jtulach@89
   325
                    <jvmarg line="${run.jvmargs}"/>
jtulach@89
   326
                    <classpath>
jtulach@89
   327
                        <path path="@{classpath}"/>
jtulach@89
   328
                    </classpath>
jtulach@89
   329
                    <syspropertyset>
jtulach@89
   330
                        <propertyref prefix="run-sys-prop."/>
jtulach@89
   331
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jtulach@89
   332
                    </syspropertyset>
jtulach@89
   333
                    <customize/>
jtulach@89
   334
                </java>
jtulach@89
   335
            </sequential>
jtulach@89
   336
        </macrodef>
jtulach@89
   337
    </target>
jtulach@89
   338
    <target name="-init-macrodef-java">
jtulach@89
   339
        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@89
   340
            <attribute default="${main.class}" name="classname"/>
jtulach@340
   341
            <attribute default="${run.classpath}" name="classpath"/>
jtulach@89
   342
            <element name="customize" optional="true"/>
jtulach@89
   343
            <sequential>
jtulach@89
   344
                <java classname="@{classname}" dir="${work.dir}" fork="true">
jtulach@340
   345
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
jtulach@340
   346
                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
jtulach@340
   347
                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
jtulach@89
   348
                    <jvmarg line="${run.jvmargs}"/>
jtulach@89
   349
                    <classpath>
jtulach@340
   350
                        <path path="@{classpath}"/>
jtulach@89
   351
                    </classpath>
jtulach@89
   352
                    <syspropertyset>
jtulach@89
   353
                        <propertyref prefix="run-sys-prop."/>
jtulach@89
   354
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jtulach@89
   355
                    </syspropertyset>
jtulach@89
   356
                    <customize/>
jtulach@89
   357
                </java>
jtulach@89
   358
            </sequential>
jtulach@89
   359
        </macrodef>
jtulach@89
   360
    </target>
jtulach@89
   361
    <target name="-init-presetdef-jar">
jtulach@89
   362
        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@89
   363
            <jar compress="${jar.compress}" jarfile="${dist.jar}">
jtulach@89
   364
                <j2seproject1:fileset dir="${build.classes.dir}"/>
jtulach@89
   365
            </jar>
jtulach@89
   366
        </presetdef>
jtulach@89
   367
    </target>
jtulach@89
   368
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
jtulach@89
   369
    <!--
jtulach@89
   370
                ===================
jtulach@89
   371
                COMPILATION SECTION
jtulach@89
   372
                ===================
jtulach@89
   373
            -->
jtulach@340
   374
    <target name="-deps-jar-init" unless="built-jar.properties">
jtulach@340
   375
        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
jtulach@340
   376
        <delete file="${built-jar.properties}" quiet="true"/>
jtulach@340
   377
    </target>
jtulach@340
   378
    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
jtulach@340
   379
        <echo level="warn" message="Cycle detected: extensibleicon was already built"/>
jtulach@340
   380
    </target>
jtulach@340
   381
    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
jtulach@340
   382
        <mkdir dir="${build.dir}"/>
jtulach@340
   383
        <touch file="${built-jar.properties}" verbose="false"/>
jtulach@340
   384
        <property file="${built-jar.properties}" prefix="already.built.jar."/>
jtulach@340
   385
        <antcall target="-warn-already-built-jar"/>
jtulach@340
   386
        <propertyfile file="${built-jar.properties}">
jtulach@340
   387
            <entry key="${basedir}" value=""/>
jtulach@340
   388
        </propertyfile>
jtulach@340
   389
    </target>
jtulach@340
   390
    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
jtulach@340
   391
    <target depends="init" name="-check-automatic-build">
jtulach@340
   392
        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
jtulach@340
   393
    </target>
jtulach@340
   394
    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
jtulach@340
   395
        <antcall target="clean"/>
jtulach@340
   396
    </target>
jtulach@89
   397
    <target depends="init,deps-jar" name="-pre-pre-compile">
jtulach@89
   398
        <mkdir dir="${build.classes.dir}"/>
jtulach@89
   399
    </target>
jtulach@89
   400
    <target name="-pre-compile">
jtulach@89
   401
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   402
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   403
    </target>
jtulach@89
   404
    <target if="do.depend.true" name="-compile-depend">
jtulach@340
   405
        <pathconvert property="build.generated.subdirs">
jtulach@340
   406
            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
jtulach@340
   407
                <include name="*"/>
jtulach@340
   408
            </dirset>
jtulach@340
   409
        </pathconvert>
jtulach@340
   410
        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
jtulach@89
   411
    </target>
jtulach@89
   412
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
jtulach@340
   413
        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
jtulach@89
   414
        <copy todir="${build.classes.dir}">
jtulach@89
   415
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@89
   416
        </copy>
jtulach@89
   417
    </target>
jtulach@89
   418
    <target name="-post-compile">
jtulach@89
   419
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   420
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   421
    </target>
jtulach@340
   422
    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
jtulach@89
   423
    <target name="-pre-compile-single">
jtulach@89
   424
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   425
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   426
    </target>
jtulach@89
   427
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
jtulach@89
   428
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
jtulach@89
   429
        <j2seproject3:force-recompile/>
jtulach@340
   430
        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
jtulach@89
   431
    </target>
jtulach@89
   432
    <target name="-post-compile-single">
jtulach@89
   433
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   434
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   435
    </target>
jtulach@340
   436
    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
jtulach@89
   437
    <!--
jtulach@89
   438
                ====================
jtulach@89
   439
                JAR BUILDING SECTION
jtulach@89
   440
                ====================
jtulach@89
   441
            -->
jtulach@89
   442
    <target depends="init" name="-pre-pre-jar">
jtulach@89
   443
        <dirname file="${dist.jar}" property="dist.jar.dir"/>
jtulach@89
   444
        <mkdir dir="${dist.jar.dir}"/>
jtulach@89
   445
    </target>
jtulach@89
   446
    <target name="-pre-jar">
jtulach@89
   447
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   448
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   449
    </target>
jtulach@340
   450
    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
jtulach@89
   451
        <j2seproject1:jar/>
jtulach@89
   452
    </target>
jtulach@340
   453
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
jtulach@89
   454
        <j2seproject1:jar manifest="${manifest.file}"/>
jtulach@89
   455
    </target>
jtulach@89
   456
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
jtulach@89
   457
        <j2seproject1:jar manifest="${manifest.file}">
jtulach@89
   458
            <j2seproject1:manifest>
jtulach@89
   459
                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
jtulach@89
   460
            </j2seproject1:manifest>
jtulach@89
   461
        </j2seproject1:jar>
jtulach@89
   462
        <echo>To run this application from the command line without Ant, try:</echo>
jtulach@89
   463
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@89
   464
        <property location="${dist.jar}" name="dist.jar.resolved"/>
jtulach@89
   465
        <pathconvert property="run.classpath.with.dist.jar">
jtulach@89
   466
            <path path="${run.classpath}"/>
jtulach@89
   467
            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
jtulach@89
   468
        </pathconvert>
jtulach@89
   469
        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
jtulach@89
   470
    </target>
jtulach@89
   471
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
jtulach@89
   472
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@89
   473
        <pathconvert property="run.classpath.without.build.classes.dir">
jtulach@89
   474
            <path path="${run.classpath}"/>
jtulach@89
   475
            <map from="${build.classes.dir.resolved}" to=""/>
jtulach@89
   476
        </pathconvert>
jtulach@89
   477
        <pathconvert pathsep=" " property="jar.classpath">
jtulach@89
   478
            <path path="${run.classpath.without.build.classes.dir}"/>
jtulach@89
   479
            <chainedmapper>
jtulach@89
   480
                <flattenmapper/>
jtulach@89
   481
                <globmapper from="*" to="lib/*"/>
jtulach@89
   482
            </chainedmapper>
jtulach@89
   483
        </pathconvert>
jtulach@89
   484
        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
jtulach@89
   485
        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
jtulach@89
   486
            <fileset dir="${build.classes.dir}"/>
jtulach@89
   487
            <manifest>
jtulach@89
   488
                <attribute name="Main-Class" value="${main.class}"/>
jtulach@89
   489
                <attribute name="Class-Path" value="${jar.classpath}"/>
jtulach@89
   490
            </manifest>
jtulach@89
   491
        </copylibs>
jtulach@89
   492
        <echo>To run this application from the command line without Ant, try:</echo>
jtulach@89
   493
        <property location="${dist.jar}" name="dist.jar.resolved"/>
jtulach@89
   494
        <echo>java -jar "${dist.jar.resolved}"</echo>
jtulach@89
   495
    </target>
jtulach@340
   496
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
jtulach@340
   497
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@340
   498
        <pathconvert property="run.classpath.without.build.classes.dir">
jtulach@340
   499
            <path path="${run.classpath}"/>
jtulach@340
   500
            <map from="${build.classes.dir.resolved}" to=""/>
jtulach@340
   501
        </pathconvert>
jtulach@340
   502
        <pathconvert pathsep=" " property="jar.classpath">
jtulach@340
   503
            <path path="${run.classpath.without.build.classes.dir}"/>
jtulach@340
   504
            <chainedmapper>
jtulach@340
   505
                <flattenmapper/>
jtulach@340
   506
                <globmapper from="*" to="lib/*"/>
jtulach@340
   507
            </chainedmapper>
jtulach@340
   508
        </pathconvert>
jtulach@340
   509
        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
jtulach@340
   510
        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
jtulach@340
   511
            <fileset dir="${build.classes.dir}"/>
jtulach@340
   512
            <manifest>
jtulach@340
   513
                <attribute name="Class-Path" value="${jar.classpath}"/>
jtulach@340
   514
            </manifest>
jtulach@340
   515
        </copylibs>
jtulach@340
   516
    </target>
jtulach@340
   517
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
jtulach@340
   518
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@340
   519
        <pathconvert property="run.classpath.without.build.classes.dir">
jtulach@340
   520
            <path path="${run.classpath}"/>
jtulach@340
   521
            <map from="${build.classes.dir.resolved}" to=""/>
jtulach@340
   522
        </pathconvert>
jtulach@340
   523
        <pathconvert pathsep=" " property="jar.classpath">
jtulach@340
   524
            <path path="${run.classpath.without.build.classes.dir}"/>
jtulach@340
   525
            <chainedmapper>
jtulach@340
   526
                <flattenmapper/>
jtulach@340
   527
                <globmapper from="*" to="lib/*"/>
jtulach@340
   528
            </chainedmapper>
jtulach@340
   529
        </pathconvert>
jtulach@340
   530
        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
jtulach@340
   531
        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
jtulach@340
   532
            <fileset dir="${build.classes.dir}"/>
jtulach@340
   533
            <manifest>
jtulach@340
   534
                <attribute name="Class-Path" value="${jar.classpath}"/>
jtulach@340
   535
            </manifest>
jtulach@340
   536
        </copylibs>
jtulach@340
   537
    </target>
jtulach@89
   538
    <target name="-post-jar">
jtulach@89
   539
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   540
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   541
    </target>
jtulach@340
   542
    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
jtulach@89
   543
    <!--
jtulach@89
   544
                =================
jtulach@89
   545
                EXECUTION SECTION
jtulach@89
   546
                =================
jtulach@89
   547
            -->
jtulach@89
   548
    <target depends="init,compile" description="Run a main class." name="run">
jtulach@89
   549
        <j2seproject1:java>
jtulach@89
   550
            <customize>
jtulach@89
   551
                <arg line="${application.args}"/>
jtulach@89
   552
            </customize>
jtulach@89
   553
        </j2seproject1:java>
jtulach@89
   554
    </target>
jtulach@89
   555
    <target name="-do-not-recompile">
jtulach@89
   556
        <property name="javac.includes.binary" value=""/>
jtulach@89
   557
    </target>
jtulach@340
   558
    <target depends="init,compile-single" name="run-single">
jtulach@89
   559
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jtulach@89
   560
        <j2seproject1:java classname="${run.class}"/>
jtulach@89
   561
    </target>
jtulach@340
   562
    <target depends="init,compile-test-single" name="run-test-with-main">
jtulach@340
   563
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jtulach@340
   564
        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
jtulach@340
   565
    </target>
jtulach@89
   566
    <!--
jtulach@89
   567
                =================
jtulach@89
   568
                DEBUGGING SECTION
jtulach@89
   569
                =================
jtulach@89
   570
            -->
jtulach@89
   571
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
jtulach@89
   572
        <j2seproject1:nbjpdastart name="${debug.class}"/>
jtulach@89
   573
    </target>
jtulach@340
   574
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
jtulach@340
   575
        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
jtulach@340
   576
    </target>
jtulach@89
   577
    <target depends="init,compile" name="-debug-start-debuggee">
jtulach@89
   578
        <j2seproject3:debug>
jtulach@89
   579
            <customize>
jtulach@89
   580
                <arg line="${application.args}"/>
jtulach@89
   581
            </customize>
jtulach@89
   582
        </j2seproject3:debug>
jtulach@89
   583
    </target>
jtulach@89
   584
    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
jtulach@89
   585
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
jtulach@89
   586
        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
jtulach@89
   587
    </target>
jtulach@89
   588
    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
jtulach@89
   589
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
jtulach@89
   590
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
jtulach@89
   591
        <j2seproject3:debug classname="${debug.class}"/>
jtulach@89
   592
    </target>
jtulach@340
   593
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
jtulach@340
   594
    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
jtulach@340
   595
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
jtulach@340
   596
        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
jtulach@340
   597
    </target>
jtulach@340
   598
    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
jtulach@89
   599
    <target depends="init" name="-pre-debug-fix">
jtulach@89
   600
        <fail unless="fix.includes">Must set fix.includes</fail>
jtulach@89
   601
        <property name="javac.includes" value="${fix.includes}.java"/>
jtulach@89
   602
    </target>
jtulach@89
   603
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
jtulach@89
   604
        <j2seproject1:nbjpdareload/>
jtulach@89
   605
    </target>
jtulach@89
   606
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
jtulach@89
   607
    <!--
jtulach@89
   608
                ===============
jtulach@89
   609
                JAVADOC SECTION
jtulach@89
   610
                ===============
jtulach@89
   611
            -->
jtulach@89
   612
    <target depends="init" name="-javadoc-build">
jtulach@89
   613
        <mkdir dir="${dist.javadoc.dir}"/>
jtulach@89
   614
        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
jtulach@89
   615
            <classpath>
jtulach@89
   616
                <path path="${javac.classpath}"/>
jtulach@89
   617
            </classpath>
jtulach@89
   618
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
jtulach@89
   619
                <filename name="**/*.java"/>
jtulach@89
   620
            </fileset>
jtulach@340
   621
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
jtulach@340
   622
                <include name="**/*.java"/>
jtulach@340
   623
            </fileset>
jtulach@89
   624
        </javadoc>
jtulach@89
   625
    </target>
jtulach@89
   626
    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
jtulach@89
   627
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
jtulach@89
   628
    </target>
jtulach@89
   629
    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
jtulach@89
   630
    <!--
jtulach@89
   631
                =========================
jtulach@89
   632
                JUNIT COMPILATION SECTION
jtulach@89
   633
                =========================
jtulach@89
   634
            -->
jtulach@89
   635
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
jtulach@89
   636
        <mkdir dir="${build.test.classes.dir}"/>
jtulach@89
   637
    </target>
jtulach@89
   638
    <target name="-pre-compile-test">
jtulach@89
   639
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   640
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   641
    </target>
jtulach@89
   642
    <target if="do.depend.true" name="-compile-test-depend">
jtulach@89
   643
        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
jtulach@89
   644
    </target>
jtulach@89
   645
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
jtulach@89
   646
        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
jtulach@89
   647
        <copy todir="${build.test.classes.dir}">
jtulach@89
   648
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@89
   649
        </copy>
jtulach@89
   650
    </target>
jtulach@89
   651
    <target name="-post-compile-test">
jtulach@89
   652
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   653
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   654
    </target>
jtulach@89
   655
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
jtulach@89
   656
    <target name="-pre-compile-test-single">
jtulach@89
   657
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   658
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   659
    </target>
jtulach@89
   660
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
jtulach@89
   661
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
jtulach@89
   662
        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
jtulach@89
   663
        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
jtulach@89
   664
        <copy todir="${build.test.classes.dir}">
jtulach@89
   665
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@89
   666
        </copy>
jtulach@89
   667
    </target>
jtulach@89
   668
    <target name="-post-compile-test-single">
jtulach@89
   669
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   670
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   671
    </target>
jtulach@89
   672
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
jtulach@89
   673
    <!--
jtulach@89
   674
                =======================
jtulach@89
   675
                JUNIT EXECUTION SECTION
jtulach@89
   676
                =======================
jtulach@89
   677
            -->
jtulach@89
   678
    <target depends="init" if="have.tests" name="-pre-test-run">
jtulach@89
   679
        <mkdir dir="${build.test.results.dir}"/>
jtulach@89
   680
    </target>
jtulach@89
   681
    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
jtulach@89
   682
        <j2seproject3:junit testincludes="**/*Test.java"/>
jtulach@89
   683
    </target>
jtulach@89
   684
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
jtulach@340
   685
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
jtulach@89
   686
    </target>
jtulach@89
   687
    <target depends="init" if="have.tests" name="test-report"/>
jtulach@89
   688
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
jtulach@89
   689
    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
jtulach@89
   690
    <target depends="init" if="have.tests" name="-pre-test-run-single">
jtulach@89
   691
        <mkdir dir="${build.test.results.dir}"/>
jtulach@89
   692
    </target>
jtulach@89
   693
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
jtulach@89
   694
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
jtulach@89
   695
        <j2seproject3:junit excludes="" includes="${test.includes}"/>
jtulach@89
   696
    </target>
jtulach@89
   697
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
jtulach@340
   698
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
jtulach@89
   699
    </target>
jtulach@340
   700
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
jtulach@89
   701
    <!--
jtulach@89
   702
                =======================
jtulach@89
   703
                JUNIT DEBUGGING SECTION
jtulach@89
   704
                =======================
jtulach@89
   705
            -->
jtulach@89
   706
    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
jtulach@89
   707
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
jtulach@89
   708
        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
jtulach@89
   709
        <delete file="${test.report.file}"/>
jtulach@89
   710
        <mkdir dir="${build.test.results.dir}"/>
jtulach@89
   711
        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
jtulach@89
   712
            <customize>
jtulach@89
   713
                <syspropertyset>
jtulach@89
   714
                    <propertyref prefix="test-sys-prop."/>
jtulach@89
   715
                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
jtulach@89
   716
                </syspropertyset>
jtulach@89
   717
                <arg value="${test.class}"/>
jtulach@89
   718
                <arg value="showoutput=true"/>
jtulach@89
   719
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
jtulach@89
   720
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
jtulach@89
   721
            </customize>
jtulach@89
   722
        </j2seproject3:debug>
jtulach@89
   723
    </target>
jtulach@89
   724
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
jtulach@89
   725
        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
jtulach@89
   726
    </target>
jtulach@340
   727
    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
jtulach@89
   728
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
jtulach@89
   729
        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
jtulach@89
   730
    </target>
jtulach@89
   731
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
jtulach@89
   732
    <!--
jtulach@89
   733
                =========================
jtulach@89
   734
                APPLET EXECUTION SECTION
jtulach@89
   735
                =========================
jtulach@89
   736
            -->
jtulach@89
   737
    <target depends="init,compile-single" name="run-applet">
jtulach@89
   738
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jtulach@89
   739
        <j2seproject1:java classname="sun.applet.AppletViewer">
jtulach@89
   740
            <customize>
jtulach@89
   741
                <arg value="${applet.url}"/>
jtulach@89
   742
            </customize>
jtulach@89
   743
        </j2seproject1:java>
jtulach@89
   744
    </target>
jtulach@89
   745
    <!--
jtulach@89
   746
                =========================
jtulach@89
   747
                APPLET DEBUGGING  SECTION
jtulach@89
   748
                =========================
jtulach@89
   749
            -->
jtulach@89
   750
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
jtulach@89
   751
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jtulach@89
   752
        <j2seproject3:debug classname="sun.applet.AppletViewer">
jtulach@89
   753
            <customize>
jtulach@89
   754
                <arg value="${applet.url}"/>
jtulach@89
   755
            </customize>
jtulach@89
   756
        </j2seproject3:debug>
jtulach@89
   757
    </target>
jtulach@89
   758
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
jtulach@89
   759
    <!--
jtulach@89
   760
                ===============
jtulach@89
   761
                CLEANUP SECTION
jtulach@89
   762
                ===============
jtulach@89
   763
            -->
jtulach@340
   764
    <target name="-deps-clean-init" unless="built-clean.properties">
jtulach@340
   765
        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
jtulach@340
   766
        <delete file="${built-clean.properties}" quiet="true"/>
jtulach@340
   767
    </target>
jtulach@340
   768
    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
jtulach@340
   769
        <echo level="warn" message="Cycle detected: extensibleicon was already built"/>
jtulach@340
   770
    </target>
jtulach@340
   771
    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
jtulach@340
   772
        <mkdir dir="${build.dir}"/>
jtulach@340
   773
        <touch file="${built-clean.properties}" verbose="false"/>
jtulach@340
   774
        <property file="${built-clean.properties}" prefix="already.built.clean."/>
jtulach@340
   775
        <antcall target="-warn-already-built-clean"/>
jtulach@340
   776
        <propertyfile file="${built-clean.properties}">
jtulach@340
   777
            <entry key="${basedir}" value=""/>
jtulach@340
   778
        </propertyfile>
jtulach@340
   779
    </target>
jtulach@89
   780
    <target depends="init" name="-do-clean">
jtulach@89
   781
        <delete dir="${build.dir}"/>
jtulach@340
   782
        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
jtulach@89
   783
    </target>
jtulach@89
   784
    <target name="-post-clean">
jtulach@89
   785
        <!-- Empty placeholder for easier customization. -->
jtulach@89
   786
        <!-- You can override this target in the ../build.xml file. -->
jtulach@89
   787
    </target>
jtulach@89
   788
    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
jtulach@340
   789
    <target name="-check-call-dep">
jtulach@340
   790
        <property file="${call.built.properties}" prefix="already.built."/>
jtulach@340
   791
        <condition property="should.call.dep">
jtulach@340
   792
            <not>
jtulach@340
   793
                <isset property="already.built.${call.subproject}"/>
jtulach@340
   794
            </not>
jtulach@340
   795
        </condition>
jtulach@340
   796
    </target>
jtulach@340
   797
    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
jtulach@340
   798
        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
jtulach@340
   799
            <propertyset>
jtulach@340
   800
                <propertyref prefix="transfer."/>
jtulach@340
   801
                <mapper from="transfer.*" to="*" type="glob"/>
jtulach@340
   802
            </propertyset>
jtulach@340
   803
        </ant>
jtulach@340
   804
    </target>
jtulach@89
   805
</project>