samples/trycatchredo/nbproject/build-impl.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Sun, 01 Feb 2009 16:29:46 +0100
changeset 312 0678c9589013
child 413 f11943a373a7
permissions -rw-r--r--
Renaming the project to 'Try Catch Redo'
jtulach@312
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@312
     2
<!--
jtulach@312
     3
*** GENERATED FROM project.xml - DO NOT EDIT  ***
jtulach@312
     4
***         EDIT ../build.xml INSTEAD         ***
jtulach@312
     5
jtulach@312
     6
For the purpose of easier reading the script
jtulach@312
     7
is divided into following sections:
jtulach@312
     8
jtulach@312
     9
  - initialization
jtulach@312
    10
  - compilation
jtulach@312
    11
  - jar
jtulach@312
    12
  - execution
jtulach@312
    13
  - debugging
jtulach@312
    14
  - javadoc
jtulach@312
    15
  - junit compilation
jtulach@312
    16
  - junit execution
jtulach@312
    17
  - junit debugging
jtulach@312
    18
  - applet
jtulach@312
    19
  - cleanup
jtulach@312
    20
jtulach@312
    21
        -->
jtulach@312
    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="trycatchredo-impl">
jtulach@312
    23
    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
jtulach@312
    24
    <!-- 
jtulach@312
    25
                ======================
jtulach@312
    26
                INITIALIZATION SECTION 
jtulach@312
    27
                ======================
jtulach@312
    28
            -->
jtulach@312
    29
    <target name="-pre-init">
jtulach@312
    30
        <!-- Empty placeholder for easier customization. -->
jtulach@312
    31
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
    32
    </target>
jtulach@312
    33
    <target depends="-pre-init" name="-init-private">
jtulach@312
    34
        <property file="nbproject/private/config.properties"/>
jtulach@312
    35
        <property file="nbproject/private/configs/${config}.properties"/>
jtulach@312
    36
        <property file="nbproject/private/private.properties"/>
jtulach@312
    37
    </target>
jtulach@312
    38
    <target depends="-pre-init,-init-private" name="-init-user">
jtulach@312
    39
        <property file="${user.properties.file}"/>
jtulach@312
    40
        <!-- The two properties below are usually overridden -->
jtulach@312
    41
        <!-- by the active platform. Just a fallback. -->
jtulach@312
    42
        <property name="default.javac.source" value="1.4"/>
jtulach@312
    43
        <property name="default.javac.target" value="1.4"/>
jtulach@312
    44
    </target>
jtulach@312
    45
    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
jtulach@312
    46
        <property file="nbproject/configs/${config}.properties"/>
jtulach@312
    47
        <property file="nbproject/project.properties"/>
jtulach@312
    48
    </target>
jtulach@312
    49
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
jtulach@312
    50
        <available file="${manifest.file}" property="manifest.available"/>
jtulach@312
    51
        <condition property="manifest.available+main.class">
jtulach@312
    52
            <and>
jtulach@312
    53
                <isset property="manifest.available"/>
jtulach@312
    54
                <isset property="main.class"/>
jtulach@312
    55
                <not>
jtulach@312
    56
                    <equals arg1="${main.class}" arg2="" trim="true"/>
jtulach@312
    57
                </not>
jtulach@312
    58
            </and>
jtulach@312
    59
        </condition>
jtulach@312
    60
        <condition property="manifest.available+main.class+mkdist.available">
jtulach@312
    61
            <and>
jtulach@312
    62
                <istrue value="${manifest.available+main.class}"/>
jtulach@312
    63
                <isset property="libs.CopyLibs.classpath"/>
jtulach@312
    64
            </and>
jtulach@312
    65
        </condition>
jtulach@312
    66
        <condition property="have.tests">
jtulach@312
    67
            <or>
jtulach@312
    68
                <available file="${test.src.dir}"/>
jtulach@312
    69
            </or>
jtulach@312
    70
        </condition>
jtulach@312
    71
        <condition property="have.sources">
jtulach@312
    72
            <or>
jtulach@312
    73
                <available file="${src.dir}"/>
jtulach@312
    74
            </or>
jtulach@312
    75
        </condition>
jtulach@312
    76
        <condition property="netbeans.home+have.tests">
jtulach@312
    77
            <and>
jtulach@312
    78
                <isset property="netbeans.home"/>
jtulach@312
    79
                <isset property="have.tests"/>
jtulach@312
    80
            </and>
jtulach@312
    81
        </condition>
jtulach@312
    82
        <condition property="no.javadoc.preview">
jtulach@312
    83
            <and>
jtulach@312
    84
                <isset property="javadoc.preview"/>
jtulach@312
    85
                <isfalse value="${javadoc.preview}"/>
jtulach@312
    86
            </and>
jtulach@312
    87
        </condition>
jtulach@312
    88
        <property name="run.jvmargs" value=""/>
jtulach@312
    89
        <property name="javac.compilerargs" value=""/>
jtulach@312
    90
        <property name="work.dir" value="${basedir}"/>
jtulach@312
    91
        <condition property="no.deps">
jtulach@312
    92
            <and>
jtulach@312
    93
                <istrue value="${no.dependencies}"/>
jtulach@312
    94
            </and>
jtulach@312
    95
        </condition>
jtulach@312
    96
        <property name="javac.debug" value="true"/>
jtulach@312
    97
        <property name="javadoc.preview" value="true"/>
jtulach@312
    98
        <property name="application.args" value=""/>
jtulach@312
    99
        <property name="source.encoding" value="${file.encoding}"/>
jtulach@312
   100
        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
jtulach@312
   101
            <and>
jtulach@312
   102
                <isset property="javadoc.encoding"/>
jtulach@312
   103
                <not>
jtulach@312
   104
                    <equals arg1="${javadoc.encoding}" arg2=""/>
jtulach@312
   105
                </not>
jtulach@312
   106
            </and>
jtulach@312
   107
        </condition>
jtulach@312
   108
        <property name="javadoc.encoding.used" value="${source.encoding}"/>
jtulach@312
   109
        <property name="includes" value="**"/>
jtulach@312
   110
        <property name="excludes" value=""/>
jtulach@312
   111
        <property name="do.depend" value="false"/>
jtulach@312
   112
        <condition property="do.depend.true">
jtulach@312
   113
            <istrue value="${do.depend}"/>
jtulach@312
   114
        </condition>
jtulach@312
   115
        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
jtulach@312
   116
            <and>
jtulach@312
   117
                <isset property="jaxws.endorsed.dir"/>
jtulach@312
   118
                <available file="nbproject/jaxws-build.xml"/>
jtulach@312
   119
            </and>
jtulach@312
   120
        </condition>
jtulach@312
   121
    </target>
jtulach@312
   122
    <target name="-post-init">
jtulach@312
   123
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   124
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   125
    </target>
jtulach@312
   126
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
jtulach@312
   127
        <fail unless="src.dir">Must set src.dir</fail>
jtulach@312
   128
        <fail unless="test.src.dir">Must set test.src.dir</fail>
jtulach@312
   129
        <fail unless="build.dir">Must set build.dir</fail>
jtulach@312
   130
        <fail unless="dist.dir">Must set dist.dir</fail>
jtulach@312
   131
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
jtulach@312
   132
        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
jtulach@312
   133
        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
jtulach@312
   134
        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
jtulach@312
   135
        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
jtulach@312
   136
        <fail unless="dist.jar">Must set dist.jar</fail>
jtulach@312
   137
    </target>
jtulach@312
   138
    <target name="-init-macrodef-property">
jtulach@312
   139
        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@312
   140
            <attribute name="name"/>
jtulach@312
   141
            <attribute name="value"/>
jtulach@312
   142
            <sequential>
jtulach@312
   143
                <property name="@{name}" value="${@{value}}"/>
jtulach@312
   144
            </sequential>
jtulach@312
   145
        </macrodef>
jtulach@312
   146
    </target>
jtulach@312
   147
    <target name="-init-macrodef-javac">
jtulach@312
   148
        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@312
   149
            <attribute default="${src.dir}" name="srcdir"/>
jtulach@312
   150
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@312
   151
            <attribute default="${javac.classpath}" name="classpath"/>
jtulach@312
   152
            <attribute default="${includes}" name="includes"/>
jtulach@312
   153
            <attribute default="${excludes}" name="excludes"/>
jtulach@312
   154
            <attribute default="${javac.debug}" name="debug"/>
jtulach@312
   155
            <attribute default="" name="sourcepath"/>
jtulach@312
   156
            <element name="customize" optional="true"/>
jtulach@312
   157
            <sequential>
jtulach@312
   158
                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
jtulach@312
   159
                    <classpath>
jtulach@312
   160
                        <path path="@{classpath}"/>
jtulach@312
   161
                    </classpath>
jtulach@312
   162
                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
jtulach@312
   163
                    <customize/>
jtulach@312
   164
                </javac>
jtulach@312
   165
            </sequential>
jtulach@312
   166
        </macrodef>
jtulach@312
   167
        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@312
   168
            <attribute default="${src.dir}" name="srcdir"/>
jtulach@312
   169
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@312
   170
            <attribute default="${javac.classpath}" name="classpath"/>
jtulach@312
   171
            <sequential>
jtulach@312
   172
                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
jtulach@312
   173
                    <classpath>
jtulach@312
   174
                        <path path="@{classpath}"/>
jtulach@312
   175
                    </classpath>
jtulach@312
   176
                </depend>
jtulach@312
   177
            </sequential>
jtulach@312
   178
        </macrodef>
jtulach@312
   179
        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@312
   180
            <attribute default="${build.classes.dir}" name="destdir"/>
jtulach@312
   181
            <sequential>
jtulach@312
   182
                <fail unless="javac.includes">Must set javac.includes</fail>
jtulach@312
   183
                <pathconvert pathsep="," property="javac.includes.binary">
jtulach@312
   184
                    <path>
jtulach@312
   185
                        <filelist dir="@{destdir}" files="${javac.includes}"/>
jtulach@312
   186
                    </path>
jtulach@312
   187
                    <globmapper from="*.java" to="*.class"/>
jtulach@312
   188
                </pathconvert>
jtulach@312
   189
                <delete>
jtulach@312
   190
                    <files includes="${javac.includes.binary}"/>
jtulach@312
   191
                </delete>
jtulach@312
   192
            </sequential>
jtulach@312
   193
        </macrodef>
jtulach@312
   194
    </target>
jtulach@312
   195
    <target name="-init-macrodef-junit">
jtulach@312
   196
        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@312
   197
            <attribute default="${includes}" name="includes"/>
jtulach@312
   198
            <attribute default="${excludes}" name="excludes"/>
jtulach@312
   199
            <attribute default="**" name="testincludes"/>
jtulach@312
   200
            <sequential>
jtulach@312
   201
                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
jtulach@312
   202
                    <batchtest todir="${build.test.results.dir}">
jtulach@312
   203
                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
jtulach@312
   204
                            <filename name="@{testincludes}"/>
jtulach@312
   205
                        </fileset>
jtulach@312
   206
                    </batchtest>
jtulach@312
   207
                    <classpath>
jtulach@312
   208
                        <path path="${run.test.classpath}"/>
jtulach@312
   209
                    </classpath>
jtulach@312
   210
                    <syspropertyset>
jtulach@312
   211
                        <propertyref prefix="test-sys-prop."/>
jtulach@312
   212
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
jtulach@312
   213
                    </syspropertyset>
jtulach@312
   214
                    <formatter type="brief" usefile="false"/>
jtulach@312
   215
                    <formatter type="xml"/>
jtulach@312
   216
                    <jvmarg line="${run.jvmargs}"/>
jtulach@312
   217
                </junit>
jtulach@312
   218
            </sequential>
jtulach@312
   219
        </macrodef>
jtulach@312
   220
    </target>
jtulach@312
   221
    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
jtulach@312
   222
        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@312
   223
            <attribute default="${main.class}" name="name"/>
jtulach@312
   224
            <attribute default="${debug.classpath}" name="classpath"/>
jtulach@312
   225
            <attribute default="" name="stopclassname"/>
jtulach@312
   226
            <sequential>
jtulach@312
   227
                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
jtulach@312
   228
                    <classpath>
jtulach@312
   229
                        <path path="@{classpath}"/>
jtulach@312
   230
                    </classpath>
jtulach@312
   231
                </nbjpdastart>
jtulach@312
   232
            </sequential>
jtulach@312
   233
        </macrodef>
jtulach@312
   234
        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@312
   235
            <attribute default="${build.classes.dir}" name="dir"/>
jtulach@312
   236
            <sequential>
jtulach@312
   237
                <nbjpdareload>
jtulach@312
   238
                    <fileset dir="@{dir}" includes="${fix.classes}">
jtulach@312
   239
                        <include name="${fix.includes}*.class"/>
jtulach@312
   240
                    </fileset>
jtulach@312
   241
                </nbjpdareload>
jtulach@312
   242
            </sequential>
jtulach@312
   243
        </macrodef>
jtulach@312
   244
    </target>
jtulach@312
   245
    <target name="-init-debug-args">
jtulach@312
   246
        <property name="version-output" value="java version &quot;${ant.java.version}"/>
jtulach@312
   247
        <condition property="have-jdk-older-than-1.4">
jtulach@312
   248
            <or>
jtulach@312
   249
                <contains string="${version-output}" substring="java version &quot;1.0"/>
jtulach@312
   250
                <contains string="${version-output}" substring="java version &quot;1.1"/>
jtulach@312
   251
                <contains string="${version-output}" substring="java version &quot;1.2"/>
jtulach@312
   252
                <contains string="${version-output}" substring="java version &quot;1.3"/>
jtulach@312
   253
            </or>
jtulach@312
   254
        </condition>
jtulach@312
   255
        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
jtulach@312
   256
            <istrue value="${have-jdk-older-than-1.4}"/>
jtulach@312
   257
        </condition>
jtulach@312
   258
        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
jtulach@312
   259
            <os family="windows"/>
jtulach@312
   260
        </condition>
jtulach@312
   261
        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
jtulach@312
   262
            <isset property="debug.transport"/>
jtulach@312
   263
        </condition>
jtulach@312
   264
    </target>
jtulach@312
   265
    <target depends="-init-debug-args" name="-init-macrodef-debug">
jtulach@312
   266
        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@312
   267
            <attribute default="${main.class}" name="classname"/>
jtulach@312
   268
            <attribute default="${debug.classpath}" name="classpath"/>
jtulach@312
   269
            <element name="customize" optional="true"/>
jtulach@312
   270
            <sequential>
jtulach@312
   271
                <java classname="@{classname}" dir="${work.dir}" fork="true">
jtulach@312
   272
                    <jvmarg line="${debug-args-line}"/>
jtulach@312
   273
                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
jtulach@312
   274
                    <jvmarg line="${run.jvmargs}"/>
jtulach@312
   275
                    <classpath>
jtulach@312
   276
                        <path path="@{classpath}"/>
jtulach@312
   277
                    </classpath>
jtulach@312
   278
                    <syspropertyset>
jtulach@312
   279
                        <propertyref prefix="run-sys-prop."/>
jtulach@312
   280
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jtulach@312
   281
                    </syspropertyset>
jtulach@312
   282
                    <customize/>
jtulach@312
   283
                </java>
jtulach@312
   284
            </sequential>
jtulach@312
   285
        </macrodef>
jtulach@312
   286
    </target>
jtulach@312
   287
    <target name="-init-macrodef-java">
jtulach@312
   288
        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@312
   289
            <attribute default="${main.class}" name="classname"/>
jtulach@312
   290
            <element name="customize" optional="true"/>
jtulach@312
   291
            <sequential>
jtulach@312
   292
                <java classname="@{classname}" dir="${work.dir}" fork="true">
jtulach@312
   293
                    <jvmarg line="${run.jvmargs}"/>
jtulach@312
   294
                    <classpath>
jtulach@312
   295
                        <path path="${run.classpath}"/>
jtulach@312
   296
                    </classpath>
jtulach@312
   297
                    <syspropertyset>
jtulach@312
   298
                        <propertyref prefix="run-sys-prop."/>
jtulach@312
   299
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jtulach@312
   300
                    </syspropertyset>
jtulach@312
   301
                    <customize/>
jtulach@312
   302
                </java>
jtulach@312
   303
            </sequential>
jtulach@312
   304
        </macrodef>
jtulach@312
   305
    </target>
jtulach@312
   306
    <target name="-init-presetdef-jar">
jtulach@312
   307
        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@312
   308
            <jar compress="${jar.compress}" jarfile="${dist.jar}">
jtulach@312
   309
                <j2seproject1:fileset dir="${build.classes.dir}"/>
jtulach@312
   310
            </jar>
jtulach@312
   311
        </presetdef>
jtulach@312
   312
    </target>
jtulach@312
   313
    <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@312
   314
    <!--
jtulach@312
   315
                ===================
jtulach@312
   316
                COMPILATION SECTION
jtulach@312
   317
                ===================
jtulach@312
   318
            -->
jtulach@312
   319
    <target depends="init" name="deps-jar" unless="no.deps"/>
jtulach@312
   320
    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
jtulach@312
   321
    <target depends="init" name="-check-automatic-build">
jtulach@312
   322
        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
jtulach@312
   323
    </target>
jtulach@312
   324
    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
jtulach@312
   325
        <antcall target="clean"/>
jtulach@312
   326
    </target>
jtulach@312
   327
    <target depends="init,deps-jar" name="-pre-pre-compile">
jtulach@312
   328
        <mkdir dir="${build.classes.dir}"/>
jtulach@312
   329
    </target>
jtulach@312
   330
    <target name="-pre-compile">
jtulach@312
   331
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   332
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   333
    </target>
jtulach@312
   334
    <target if="do.depend.true" name="-compile-depend">
jtulach@312
   335
        <j2seproject3:depend/>
jtulach@312
   336
    </target>
jtulach@312
   337
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
jtulach@312
   338
        <j2seproject3:javac/>
jtulach@312
   339
        <copy todir="${build.classes.dir}">
jtulach@312
   340
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@312
   341
        </copy>
jtulach@312
   342
    </target>
jtulach@312
   343
    <target name="-post-compile">
jtulach@312
   344
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   345
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   346
    </target>
jtulach@312
   347
    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
jtulach@312
   348
    <target name="-pre-compile-single">
jtulach@312
   349
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   350
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   351
    </target>
jtulach@312
   352
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
jtulach@312
   353
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
jtulach@312
   354
        <j2seproject3:force-recompile/>
jtulach@312
   355
        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
jtulach@312
   356
    </target>
jtulach@312
   357
    <target name="-post-compile-single">
jtulach@312
   358
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   359
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   360
    </target>
jtulach@312
   361
    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
jtulach@312
   362
    <!--
jtulach@312
   363
                ====================
jtulach@312
   364
                JAR BUILDING SECTION
jtulach@312
   365
                ====================
jtulach@312
   366
            -->
jtulach@312
   367
    <target depends="init" name="-pre-pre-jar">
jtulach@312
   368
        <dirname file="${dist.jar}" property="dist.jar.dir"/>
jtulach@312
   369
        <mkdir dir="${dist.jar.dir}"/>
jtulach@312
   370
    </target>
jtulach@312
   371
    <target name="-pre-jar">
jtulach@312
   372
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   373
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   374
    </target>
jtulach@312
   375
    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
jtulach@312
   376
        <j2seproject1:jar/>
jtulach@312
   377
    </target>
jtulach@312
   378
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
jtulach@312
   379
        <j2seproject1:jar manifest="${manifest.file}"/>
jtulach@312
   380
    </target>
jtulach@312
   381
    <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@312
   382
        <j2seproject1:jar manifest="${manifest.file}">
jtulach@312
   383
            <j2seproject1:manifest>
jtulach@312
   384
                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
jtulach@312
   385
            </j2seproject1:manifest>
jtulach@312
   386
        </j2seproject1:jar>
jtulach@312
   387
        <echo>To run this application from the command line without Ant, try:</echo>
jtulach@312
   388
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@312
   389
        <property location="${dist.jar}" name="dist.jar.resolved"/>
jtulach@312
   390
        <pathconvert property="run.classpath.with.dist.jar">
jtulach@312
   391
            <path path="${run.classpath}"/>
jtulach@312
   392
            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
jtulach@312
   393
        </pathconvert>
jtulach@312
   394
        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
jtulach@312
   395
    </target>
jtulach@312
   396
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
jtulach@312
   397
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@312
   398
        <pathconvert property="run.classpath.without.build.classes.dir">
jtulach@312
   399
            <path path="${run.classpath}"/>
jtulach@312
   400
            <map from="${build.classes.dir.resolved}" to=""/>
jtulach@312
   401
        </pathconvert>
jtulach@312
   402
        <pathconvert pathsep=" " property="jar.classpath">
jtulach@312
   403
            <path path="${run.classpath.without.build.classes.dir}"/>
jtulach@312
   404
            <chainedmapper>
jtulach@312
   405
                <flattenmapper/>
jtulach@312
   406
                <globmapper from="*" to="lib/*"/>
jtulach@312
   407
            </chainedmapper>
jtulach@312
   408
        </pathconvert>
jtulach@312
   409
        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
jtulach@312
   410
        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
jtulach@312
   411
            <fileset dir="${build.classes.dir}"/>
jtulach@312
   412
            <manifest>
jtulach@312
   413
                <attribute name="Main-Class" value="${main.class}"/>
jtulach@312
   414
                <attribute name="Class-Path" value="${jar.classpath}"/>
jtulach@312
   415
            </manifest>
jtulach@312
   416
        </copylibs>
jtulach@312
   417
        <echo>To run this application from the command line without Ant, try:</echo>
jtulach@312
   418
        <property location="${dist.jar}" name="dist.jar.resolved"/>
jtulach@312
   419
        <echo>java -jar "${dist.jar.resolved}"</echo>
jtulach@312
   420
    </target>
jtulach@312
   421
    <target name="-post-jar">
jtulach@312
   422
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   423
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   424
    </target>
jtulach@312
   425
    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
jtulach@312
   426
    <!--
jtulach@312
   427
                =================
jtulach@312
   428
                EXECUTION SECTION
jtulach@312
   429
                =================
jtulach@312
   430
            -->
jtulach@312
   431
    <target depends="init,compile" description="Run a main class." name="run">
jtulach@312
   432
        <j2seproject1:java>
jtulach@312
   433
            <customize>
jtulach@312
   434
                <arg line="${application.args}"/>
jtulach@312
   435
            </customize>
jtulach@312
   436
        </j2seproject1:java>
jtulach@312
   437
    </target>
jtulach@312
   438
    <target name="-do-not-recompile">
jtulach@312
   439
        <property name="javac.includes.binary" value=""/>
jtulach@312
   440
    </target>
jtulach@312
   441
    <target depends="init,-do-not-recompile,compile-single" name="run-single">
jtulach@312
   442
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jtulach@312
   443
        <j2seproject1:java classname="${run.class}"/>
jtulach@312
   444
    </target>
jtulach@312
   445
    <!--
jtulach@312
   446
                =================
jtulach@312
   447
                DEBUGGING SECTION
jtulach@312
   448
                =================
jtulach@312
   449
            -->
jtulach@312
   450
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
jtulach@312
   451
        <j2seproject1:nbjpdastart name="${debug.class}"/>
jtulach@312
   452
    </target>
jtulach@312
   453
    <target depends="init,compile" name="-debug-start-debuggee">
jtulach@312
   454
        <j2seproject3:debug>
jtulach@312
   455
            <customize>
jtulach@312
   456
                <arg line="${application.args}"/>
jtulach@312
   457
            </customize>
jtulach@312
   458
        </j2seproject3:debug>
jtulach@312
   459
    </target>
jtulach@312
   460
    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
jtulach@312
   461
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
jtulach@312
   462
        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
jtulach@312
   463
    </target>
jtulach@312
   464
    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
jtulach@312
   465
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
jtulach@312
   466
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
jtulach@312
   467
        <j2seproject3:debug classname="${debug.class}"/>
jtulach@312
   468
    </target>
jtulach@312
   469
    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
jtulach@312
   470
    <target depends="init" name="-pre-debug-fix">
jtulach@312
   471
        <fail unless="fix.includes">Must set fix.includes</fail>
jtulach@312
   472
        <property name="javac.includes" value="${fix.includes}.java"/>
jtulach@312
   473
    </target>
jtulach@312
   474
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
jtulach@312
   475
        <j2seproject1:nbjpdareload/>
jtulach@312
   476
    </target>
jtulach@312
   477
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
jtulach@312
   478
    <!--
jtulach@312
   479
                ===============
jtulach@312
   480
                JAVADOC SECTION
jtulach@312
   481
                ===============
jtulach@312
   482
            -->
jtulach@312
   483
    <target depends="init" name="-javadoc-build">
jtulach@312
   484
        <mkdir dir="${dist.javadoc.dir}"/>
jtulach@312
   485
        <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@312
   486
            <classpath>
jtulach@312
   487
                <path path="${javac.classpath}"/>
jtulach@312
   488
            </classpath>
jtulach@312
   489
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
jtulach@312
   490
                <filename name="**/*.java"/>
jtulach@312
   491
            </fileset>
jtulach@312
   492
        </javadoc>
jtulach@312
   493
    </target>
jtulach@312
   494
    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
jtulach@312
   495
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
jtulach@312
   496
    </target>
jtulach@312
   497
    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
jtulach@312
   498
    <!--
jtulach@312
   499
                =========================
jtulach@312
   500
                JUNIT COMPILATION SECTION
jtulach@312
   501
                =========================
jtulach@312
   502
            -->
jtulach@312
   503
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
jtulach@312
   504
        <mkdir dir="${build.test.classes.dir}"/>
jtulach@312
   505
    </target>
jtulach@312
   506
    <target name="-pre-compile-test">
jtulach@312
   507
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   508
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   509
    </target>
jtulach@312
   510
    <target if="do.depend.true" name="-compile-test-depend">
jtulach@312
   511
        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
jtulach@312
   512
    </target>
jtulach@312
   513
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
jtulach@312
   514
        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
jtulach@312
   515
        <copy todir="${build.test.classes.dir}">
jtulach@312
   516
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@312
   517
        </copy>
jtulach@312
   518
    </target>
jtulach@312
   519
    <target name="-post-compile-test">
jtulach@312
   520
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   521
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   522
    </target>
jtulach@312
   523
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
jtulach@312
   524
    <target name="-pre-compile-test-single">
jtulach@312
   525
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   526
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   527
    </target>
jtulach@312
   528
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
jtulach@312
   529
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
jtulach@312
   530
        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
jtulach@312
   531
        <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@312
   532
        <copy todir="${build.test.classes.dir}">
jtulach@312
   533
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@312
   534
        </copy>
jtulach@312
   535
    </target>
jtulach@312
   536
    <target name="-post-compile-test-single">
jtulach@312
   537
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   538
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   539
    </target>
jtulach@312
   540
    <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@312
   541
    <!--
jtulach@312
   542
                =======================
jtulach@312
   543
                JUNIT EXECUTION SECTION
jtulach@312
   544
                =======================
jtulach@312
   545
            -->
jtulach@312
   546
    <target depends="init" if="have.tests" name="-pre-test-run">
jtulach@312
   547
        <mkdir dir="${build.test.results.dir}"/>
jtulach@312
   548
    </target>
jtulach@312
   549
    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
jtulach@312
   550
        <j2seproject3:junit testincludes="**/*Test.java"/>
jtulach@312
   551
    </target>
jtulach@312
   552
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
jtulach@312
   553
        <fail if="tests.failed">Some tests failed; see details above.</fail>
jtulach@312
   554
    </target>
jtulach@312
   555
    <target depends="init" if="have.tests" name="test-report"/>
jtulach@312
   556
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
jtulach@312
   557
    <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@312
   558
    <target depends="init" if="have.tests" name="-pre-test-run-single">
jtulach@312
   559
        <mkdir dir="${build.test.results.dir}"/>
jtulach@312
   560
    </target>
jtulach@312
   561
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
jtulach@312
   562
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
jtulach@312
   563
        <j2seproject3:junit excludes="" includes="${test.includes}"/>
jtulach@312
   564
    </target>
jtulach@312
   565
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
jtulach@312
   566
        <fail if="tests.failed">Some tests failed; see details above.</fail>
jtulach@312
   567
    </target>
jtulach@312
   568
    <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
jtulach@312
   569
    <!--
jtulach@312
   570
                =======================
jtulach@312
   571
                JUNIT DEBUGGING SECTION
jtulach@312
   572
                =======================
jtulach@312
   573
            -->
jtulach@312
   574
    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
jtulach@312
   575
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
jtulach@312
   576
        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
jtulach@312
   577
        <delete file="${test.report.file}"/>
jtulach@312
   578
        <mkdir dir="${build.test.results.dir}"/>
jtulach@312
   579
        <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@312
   580
            <customize>
jtulach@312
   581
                <syspropertyset>
jtulach@312
   582
                    <propertyref prefix="test-sys-prop."/>
jtulach@312
   583
                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
jtulach@312
   584
                </syspropertyset>
jtulach@312
   585
                <arg value="${test.class}"/>
jtulach@312
   586
                <arg value="showoutput=true"/>
jtulach@312
   587
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
jtulach@312
   588
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
jtulach@312
   589
            </customize>
jtulach@312
   590
        </j2seproject3:debug>
jtulach@312
   591
    </target>
jtulach@312
   592
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
jtulach@312
   593
        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
jtulach@312
   594
    </target>
jtulach@312
   595
    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
jtulach@312
   596
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
jtulach@312
   597
        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
jtulach@312
   598
    </target>
jtulach@312
   599
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
jtulach@312
   600
    <!--
jtulach@312
   601
                =========================
jtulach@312
   602
                APPLET EXECUTION SECTION
jtulach@312
   603
                =========================
jtulach@312
   604
            -->
jtulach@312
   605
    <target depends="init,compile-single" name="run-applet">
jtulach@312
   606
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jtulach@312
   607
        <j2seproject1:java classname="sun.applet.AppletViewer">
jtulach@312
   608
            <customize>
jtulach@312
   609
                <arg value="${applet.url}"/>
jtulach@312
   610
            </customize>
jtulach@312
   611
        </j2seproject1:java>
jtulach@312
   612
    </target>
jtulach@312
   613
    <!--
jtulach@312
   614
                =========================
jtulach@312
   615
                APPLET DEBUGGING  SECTION
jtulach@312
   616
                =========================
jtulach@312
   617
            -->
jtulach@312
   618
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
jtulach@312
   619
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jtulach@312
   620
        <j2seproject3:debug classname="sun.applet.AppletViewer">
jtulach@312
   621
            <customize>
jtulach@312
   622
                <arg value="${applet.url}"/>
jtulach@312
   623
            </customize>
jtulach@312
   624
        </j2seproject3:debug>
jtulach@312
   625
    </target>
jtulach@312
   626
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
jtulach@312
   627
    <!--
jtulach@312
   628
                ===============
jtulach@312
   629
                CLEANUP SECTION
jtulach@312
   630
                ===============
jtulach@312
   631
            -->
jtulach@312
   632
    <target depends="init" name="deps-clean" unless="no.deps"/>
jtulach@312
   633
    <target depends="init" name="-do-clean">
jtulach@312
   634
        <delete dir="${build.dir}"/>
jtulach@312
   635
        <delete dir="${dist.dir}"/>
jtulach@312
   636
    </target>
jtulach@312
   637
    <target name="-post-clean">
jtulach@312
   638
        <!-- Empty placeholder for easier customization. -->
jtulach@312
   639
        <!-- You can override this target in the ../build.xml file. -->
jtulach@312
   640
    </target>
jtulach@312
   641
    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
jtulach@312
   642
</project>