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