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