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