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