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