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