samples/aserverinfo/nbproject/build-impl.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Tue, 25 Aug 2009 12:39:59 +0200
changeset 338 2ed9d213455e
parent 337 d5b6a877e5a8
child 409 40cabcdcd2be
permissions -rw-r--r--
Reverting the build scripts back to 219810ff3c72
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@292
    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="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@338
   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@292
   221
    <target depends="-init-debug-args" 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@292
   227
                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
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@292
   238
                    <fileset dir="@{dir}" includes="${fix.classes}">
jtulach@292
   239
                        <include name="${fix.includes}*.class"/>
jtulach@292
   240
                    </fileset>
jtulach@90
   241
                </nbjpdareload>
jtulach@90
   242
            </sequential>
jtulach@90
   243
        </macrodef>
jtulach@90
   244
    </target>
jtulach@90
   245
    <target name="-init-debug-args">
jtulach@90
   246
        <property name="version-output" value="java version &quot;${ant.java.version}"/>
jtulach@90
   247
        <condition property="have-jdk-older-than-1.4">
jtulach@90
   248
            <or>
jtulach@90
   249
                <contains string="${version-output}" substring="java version &quot;1.0"/>
jtulach@90
   250
                <contains string="${version-output}" substring="java version &quot;1.1"/>
jtulach@90
   251
                <contains string="${version-output}" substring="java version &quot;1.2"/>
jtulach@90
   252
                <contains string="${version-output}" substring="java version &quot;1.3"/>
jtulach@90
   253
            </or>
jtulach@90
   254
        </condition>
jtulach@90
   255
        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
jtulach@90
   256
            <istrue value="${have-jdk-older-than-1.4}"/>
jtulach@90
   257
        </condition>
jtulach@292
   258
        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
jtulach@292
   259
            <os family="windows"/>
jtulach@292
   260
        </condition>
jtulach@292
   261
        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
jtulach@292
   262
            <isset property="debug.transport"/>
jtulach@292
   263
        </condition>
jtulach@90
   264
    </target>
jtulach@90
   265
    <target depends="-init-debug-args" name="-init-macrodef-debug">
jtulach@90
   266
        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
jtulach@90
   267
            <attribute default="${main.class}" name="classname"/>
jtulach@90
   268
            <attribute default="${debug.classpath}" name="classpath"/>
jtulach@90
   269
            <element name="customize" optional="true"/>
jtulach@90
   270
            <sequential>
jtulach@90
   271
                <java classname="@{classname}" dir="${work.dir}" fork="true">
jtulach@90
   272
                    <jvmarg line="${debug-args-line}"/>
jtulach@292
   273
                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
jtulach@90
   274
                    <jvmarg line="${run.jvmargs}"/>
jtulach@90
   275
                    <classpath>
jtulach@90
   276
                        <path path="@{classpath}"/>
jtulach@90
   277
                    </classpath>
jtulach@90
   278
                    <syspropertyset>
jtulach@90
   279
                        <propertyref prefix="run-sys-prop."/>
jtulach@90
   280
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jtulach@90
   281
                    </syspropertyset>
jtulach@90
   282
                    <customize/>
jtulach@90
   283
                </java>
jtulach@90
   284
            </sequential>
jtulach@90
   285
        </macrodef>
jtulach@90
   286
    </target>
jtulach@90
   287
    <target name="-init-macrodef-java">
jtulach@90
   288
        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@90
   289
            <attribute default="${main.class}" name="classname"/>
jtulach@292
   290
            <attribute default="${run.classpath}" name="classpath"/>
jtulach@90
   291
            <element name="customize" optional="true"/>
jtulach@90
   292
            <sequential>
jtulach@90
   293
                <java classname="@{classname}" dir="${work.dir}" fork="true">
jtulach@90
   294
                    <jvmarg line="${run.jvmargs}"/>
jtulach@90
   295
                    <classpath>
jtulach@292
   296
                        <path path="@{classpath}"/>
jtulach@90
   297
                    </classpath>
jtulach@90
   298
                    <syspropertyset>
jtulach@90
   299
                        <propertyref prefix="run-sys-prop."/>
jtulach@90
   300
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
jtulach@90
   301
                    </syspropertyset>
jtulach@90
   302
                    <customize/>
jtulach@90
   303
                </java>
jtulach@90
   304
            </sequential>
jtulach@90
   305
        </macrodef>
jtulach@90
   306
    </target>
jtulach@90
   307
    <target name="-init-presetdef-jar">
jtulach@90
   308
        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
jtulach@90
   309
            <jar compress="${jar.compress}" jarfile="${dist.jar}">
jtulach@90
   310
                <j2seproject1:fileset dir="${build.classes.dir}"/>
jtulach@90
   311
            </jar>
jtulach@90
   312
        </presetdef>
jtulach@90
   313
    </target>
jtulach@90
   314
    <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
   315
    <!--
jtulach@90
   316
                ===================
jtulach@90
   317
                COMPILATION SECTION
jtulach@90
   318
                ===================
jtulach@90
   319
            -->
jtulach@338
   320
    <target depends="init" name="deps-jar" unless="no.deps"/>
jtulach@292
   321
    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
jtulach@292
   322
    <target depends="init" name="-check-automatic-build">
jtulach@292
   323
        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
jtulach@292
   324
    </target>
jtulach@292
   325
    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
jtulach@292
   326
        <antcall target="clean"/>
jtulach@292
   327
    </target>
jtulach@90
   328
    <target depends="init,deps-jar" name="-pre-pre-compile">
jtulach@90
   329
        <mkdir dir="${build.classes.dir}"/>
jtulach@90
   330
    </target>
jtulach@90
   331
    <target name="-pre-compile">
jtulach@90
   332
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   333
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   334
    </target>
jtulach@90
   335
    <target if="do.depend.true" name="-compile-depend">
jtulach@338
   336
        <j2seproject3:depend/>
jtulach@90
   337
    </target>
jtulach@90
   338
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
jtulach@338
   339
        <j2seproject3:javac/>
jtulach@90
   340
        <copy todir="${build.classes.dir}">
jtulach@90
   341
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@90
   342
        </copy>
jtulach@90
   343
    </target>
jtulach@90
   344
    <target name="-post-compile">
jtulach@90
   345
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   346
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   347
    </target>
jtulach@292
   348
    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
jtulach@90
   349
    <target name="-pre-compile-single">
jtulach@90
   350
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   351
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   352
    </target>
jtulach@90
   353
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
jtulach@90
   354
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
jtulach@90
   355
        <j2seproject3:force-recompile/>
jtulach@338
   356
        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
jtulach@90
   357
    </target>
jtulach@90
   358
    <target name="-post-compile-single">
jtulach@90
   359
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   360
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   361
    </target>
jtulach@292
   362
    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
jtulach@90
   363
    <!--
jtulach@90
   364
                ====================
jtulach@90
   365
                JAR BUILDING SECTION
jtulach@90
   366
                ====================
jtulach@90
   367
            -->
jtulach@90
   368
    <target depends="init" name="-pre-pre-jar">
jtulach@90
   369
        <dirname file="${dist.jar}" property="dist.jar.dir"/>
jtulach@90
   370
        <mkdir dir="${dist.jar.dir}"/>
jtulach@90
   371
    </target>
jtulach@90
   372
    <target name="-pre-jar">
jtulach@90
   373
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   374
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   375
    </target>
jtulach@90
   376
    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
jtulach@90
   377
        <j2seproject1:jar/>
jtulach@90
   378
    </target>
jtulach@90
   379
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
jtulach@90
   380
        <j2seproject1:jar manifest="${manifest.file}"/>
jtulach@90
   381
    </target>
jtulach@90
   382
    <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
   383
        <j2seproject1:jar manifest="${manifest.file}">
jtulach@90
   384
            <j2seproject1:manifest>
jtulach@90
   385
                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
jtulach@90
   386
            </j2seproject1:manifest>
jtulach@90
   387
        </j2seproject1:jar>
jtulach@90
   388
        <echo>To run this application from the command line without Ant, try:</echo>
jtulach@90
   389
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@90
   390
        <property location="${dist.jar}" name="dist.jar.resolved"/>
jtulach@90
   391
        <pathconvert property="run.classpath.with.dist.jar">
jtulach@90
   392
            <path path="${run.classpath}"/>
jtulach@90
   393
            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
jtulach@90
   394
        </pathconvert>
jtulach@90
   395
        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
jtulach@90
   396
    </target>
jtulach@90
   397
    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
jtulach@90
   398
        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
jtulach@90
   399
        <pathconvert property="run.classpath.without.build.classes.dir">
jtulach@90
   400
            <path path="${run.classpath}"/>
jtulach@90
   401
            <map from="${build.classes.dir.resolved}" to=""/>
jtulach@90
   402
        </pathconvert>
jtulach@90
   403
        <pathconvert pathsep=" " property="jar.classpath">
jtulach@90
   404
            <path path="${run.classpath.without.build.classes.dir}"/>
jtulach@90
   405
            <chainedmapper>
jtulach@90
   406
                <flattenmapper/>
jtulach@90
   407
                <globmapper from="*" to="lib/*"/>
jtulach@90
   408
            </chainedmapper>
jtulach@90
   409
        </pathconvert>
jtulach@90
   410
        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
jtulach@90
   411
        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
jtulach@90
   412
            <fileset dir="${build.classes.dir}"/>
jtulach@90
   413
            <manifest>
jtulach@90
   414
                <attribute name="Main-Class" value="${main.class}"/>
jtulach@90
   415
                <attribute name="Class-Path" value="${jar.classpath}"/>
jtulach@90
   416
            </manifest>
jtulach@90
   417
        </copylibs>
jtulach@90
   418
        <echo>To run this application from the command line without Ant, try:</echo>
jtulach@90
   419
        <property location="${dist.jar}" name="dist.jar.resolved"/>
jtulach@90
   420
        <echo>java -jar "${dist.jar.resolved}"</echo>
jtulach@90
   421
    </target>
jtulach@90
   422
    <target name="-post-jar">
jtulach@90
   423
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   424
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   425
    </target>
jtulach@338
   426
    <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
   427
    <!--
jtulach@90
   428
                =================
jtulach@90
   429
                EXECUTION SECTION
jtulach@90
   430
                =================
jtulach@90
   431
            -->
jtulach@90
   432
    <target depends="init,compile" description="Run a main class." name="run">
jtulach@90
   433
        <j2seproject1:java>
jtulach@90
   434
            <customize>
jtulach@90
   435
                <arg line="${application.args}"/>
jtulach@90
   436
            </customize>
jtulach@90
   437
        </j2seproject1:java>
jtulach@90
   438
    </target>
jtulach@90
   439
    <target name="-do-not-recompile">
jtulach@90
   440
        <property name="javac.includes.binary" value=""/>
jtulach@90
   441
    </target>
jtulach@90
   442
    <target depends="init,-do-not-recompile,compile-single" name="run-single">
jtulach@90
   443
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jtulach@90
   444
        <j2seproject1:java classname="${run.class}"/>
jtulach@90
   445
    </target>
jtulach@292
   446
    <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
jtulach@292
   447
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
jtulach@292
   448
        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
jtulach@292
   449
    </target>
jtulach@90
   450
    <!--
jtulach@90
   451
                =================
jtulach@90
   452
                DEBUGGING SECTION
jtulach@90
   453
                =================
jtulach@90
   454
            -->
jtulach@90
   455
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
jtulach@90
   456
        <j2seproject1:nbjpdastart name="${debug.class}"/>
jtulach@90
   457
    </target>
jtulach@292
   458
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
jtulach@292
   459
        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
jtulach@292
   460
    </target>
jtulach@90
   461
    <target depends="init,compile" name="-debug-start-debuggee">
jtulach@90
   462
        <j2seproject3:debug>
jtulach@90
   463
            <customize>
jtulach@90
   464
                <arg line="${application.args}"/>
jtulach@90
   465
            </customize>
jtulach@90
   466
        </j2seproject3:debug>
jtulach@90
   467
    </target>
jtulach@90
   468
    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
jtulach@90
   469
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
jtulach@90
   470
        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
jtulach@90
   471
    </target>
jtulach@90
   472
    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
jtulach@90
   473
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
jtulach@90
   474
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
jtulach@90
   475
        <j2seproject3:debug classname="${debug.class}"/>
jtulach@90
   476
    </target>
jtulach@90
   477
    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
jtulach@292
   478
    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
jtulach@292
   479
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
jtulach@292
   480
        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
jtulach@292
   481
    </target>
jtulach@292
   482
    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
jtulach@90
   483
    <target depends="init" name="-pre-debug-fix">
jtulach@90
   484
        <fail unless="fix.includes">Must set fix.includes</fail>
jtulach@90
   485
        <property name="javac.includes" value="${fix.includes}.java"/>
jtulach@90
   486
    </target>
jtulach@90
   487
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
jtulach@90
   488
        <j2seproject1:nbjpdareload/>
jtulach@90
   489
    </target>
jtulach@90
   490
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
jtulach@90
   491
    <!--
jtulach@90
   492
                ===============
jtulach@90
   493
                JAVADOC SECTION
jtulach@90
   494
                ===============
jtulach@90
   495
            -->
jtulach@90
   496
    <target depends="init" name="-javadoc-build">
jtulach@90
   497
        <mkdir dir="${dist.javadoc.dir}"/>
jtulach@90
   498
        <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
   499
            <classpath>
jtulach@90
   500
                <path path="${javac.classpath}"/>
jtulach@90
   501
            </classpath>
jtulach@90
   502
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
jtulach@90
   503
                <filename name="**/*.java"/>
jtulach@90
   504
            </fileset>
jtulach@90
   505
        </javadoc>
jtulach@90
   506
    </target>
jtulach@90
   507
    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
jtulach@90
   508
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
jtulach@90
   509
    </target>
jtulach@90
   510
    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
jtulach@90
   511
    <!--
jtulach@90
   512
                =========================
jtulach@90
   513
                JUNIT COMPILATION SECTION
jtulach@90
   514
                =========================
jtulach@90
   515
            -->
jtulach@90
   516
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
jtulach@90
   517
        <mkdir dir="${build.test.classes.dir}"/>
jtulach@90
   518
    </target>
jtulach@90
   519
    <target name="-pre-compile-test">
jtulach@90
   520
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   521
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   522
    </target>
jtulach@90
   523
    <target if="do.depend.true" name="-compile-test-depend">
jtulach@90
   524
        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
jtulach@90
   525
    </target>
jtulach@90
   526
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
jtulach@90
   527
        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
jtulach@90
   528
        <copy todir="${build.test.classes.dir}">
jtulach@90
   529
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@90
   530
        </copy>
jtulach@90
   531
    </target>
jtulach@90
   532
    <target name="-post-compile-test">
jtulach@90
   533
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   534
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   535
    </target>
jtulach@90
   536
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
jtulach@90
   537
    <target name="-pre-compile-test-single">
jtulach@90
   538
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   539
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   540
    </target>
jtulach@90
   541
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
jtulach@90
   542
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
jtulach@90
   543
        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
jtulach@90
   544
        <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
   545
        <copy todir="${build.test.classes.dir}">
jtulach@90
   546
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
jtulach@90
   547
        </copy>
jtulach@90
   548
    </target>
jtulach@90
   549
    <target name="-post-compile-test-single">
jtulach@90
   550
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   551
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   552
    </target>
jtulach@90
   553
    <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
   554
    <!--
jtulach@90
   555
                =======================
jtulach@90
   556
                JUNIT EXECUTION SECTION
jtulach@90
   557
                =======================
jtulach@90
   558
            -->
jtulach@90
   559
    <target depends="init" if="have.tests" name="-pre-test-run">
jtulach@90
   560
        <mkdir dir="${build.test.results.dir}"/>
jtulach@90
   561
    </target>
jtulach@90
   562
    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
jtulach@90
   563
        <j2seproject3:junit testincludes="**/*Test.java"/>
jtulach@90
   564
    </target>
jtulach@90
   565
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
jtulach@338
   566
        <fail if="tests.failed">Some tests failed; see details above.</fail>
jtulach@90
   567
    </target>
jtulach@90
   568
    <target depends="init" if="have.tests" name="test-report"/>
jtulach@90
   569
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
jtulach@90
   570
    <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
   571
    <target depends="init" if="have.tests" name="-pre-test-run-single">
jtulach@90
   572
        <mkdir dir="${build.test.results.dir}"/>
jtulach@90
   573
    </target>
jtulach@90
   574
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
jtulach@90
   575
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
jtulach@90
   576
        <j2seproject3:junit excludes="" includes="${test.includes}"/>
jtulach@90
   577
    </target>
jtulach@90
   578
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
jtulach@338
   579
        <fail if="tests.failed">Some tests failed; see details above.</fail>
jtulach@90
   580
    </target>
jtulach@90
   581
    <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
   582
    <!--
jtulach@90
   583
                =======================
jtulach@90
   584
                JUNIT DEBUGGING SECTION
jtulach@90
   585
                =======================
jtulach@90
   586
            -->
jtulach@90
   587
    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
jtulach@90
   588
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
jtulach@90
   589
        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
jtulach@90
   590
        <delete file="${test.report.file}"/>
jtulach@90
   591
        <mkdir dir="${build.test.results.dir}"/>
jtulach@90
   592
        <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
   593
            <customize>
jtulach@90
   594
                <syspropertyset>
jtulach@90
   595
                    <propertyref prefix="test-sys-prop."/>
jtulach@90
   596
                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
jtulach@90
   597
                </syspropertyset>
jtulach@90
   598
                <arg value="${test.class}"/>
jtulach@90
   599
                <arg value="showoutput=true"/>
jtulach@90
   600
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
jtulach@90
   601
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
jtulach@90
   602
            </customize>
jtulach@90
   603
        </j2seproject3:debug>
jtulach@90
   604
    </target>
jtulach@90
   605
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
jtulach@90
   606
        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
jtulach@90
   607
    </target>
jtulach@90
   608
    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
jtulach@90
   609
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
jtulach@90
   610
        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
jtulach@90
   611
    </target>
jtulach@90
   612
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
jtulach@90
   613
    <!--
jtulach@90
   614
                =========================
jtulach@90
   615
                APPLET EXECUTION SECTION
jtulach@90
   616
                =========================
jtulach@90
   617
            -->
jtulach@90
   618
    <target depends="init,compile-single" name="run-applet">
jtulach@90
   619
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jtulach@90
   620
        <j2seproject1:java classname="sun.applet.AppletViewer">
jtulach@90
   621
            <customize>
jtulach@90
   622
                <arg value="${applet.url}"/>
jtulach@90
   623
            </customize>
jtulach@90
   624
        </j2seproject1:java>
jtulach@90
   625
    </target>
jtulach@90
   626
    <!--
jtulach@90
   627
                =========================
jtulach@90
   628
                APPLET DEBUGGING  SECTION
jtulach@90
   629
                =========================
jtulach@90
   630
            -->
jtulach@90
   631
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
jtulach@90
   632
        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
jtulach@90
   633
        <j2seproject3:debug classname="sun.applet.AppletViewer">
jtulach@90
   634
            <customize>
jtulach@90
   635
                <arg value="${applet.url}"/>
jtulach@90
   636
            </customize>
jtulach@90
   637
        </j2seproject3:debug>
jtulach@90
   638
    </target>
jtulach@90
   639
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
jtulach@90
   640
    <!--
jtulach@90
   641
                ===============
jtulach@90
   642
                CLEANUP SECTION
jtulach@90
   643
                ===============
jtulach@90
   644
            -->
jtulach@338
   645
    <target depends="init" name="deps-clean" unless="no.deps"/>
jtulach@90
   646
    <target depends="init" name="-do-clean">
jtulach@90
   647
        <delete dir="${build.dir}"/>
jtulach@90
   648
        <delete dir="${dist.dir}"/>
jtulach@90
   649
    </target>
jtulach@90
   650
    <target name="-post-clean">
jtulach@90
   651
        <!-- Empty placeholder for easier customization. -->
jtulach@90
   652
        <!-- You can override this target in the ../build.xml file. -->
jtulach@90
   653
    </target>
jtulach@90
   654
    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
jtulach@90
   655
</project>