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