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