java/nekurak.net-rest/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Tue Mar 23 00:54:44 2010 +0100 (2010-03-23)
changeset 76 40b228296815
child 77 5378f8dc8fa9
permissions -rw-r--r--
ZIP se zdrojáky – nebalit přebytečné věci z REST modulu.
franta-hg@75
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@75
     2
<!--
franta-hg@75
     3
        *** GENERATED FROM project.xml - DO NOT EDIT  ***
franta-hg@75
     4
        ***         EDIT ../build.xml INSTEAD         ***
franta-hg@75
     5
franta-hg@75
     6
        For the purpose of easier reading the script
franta-hg@75
     7
        is divided into following sections:
franta-hg@75
     8
        - initialization
franta-hg@75
     9
        - compilation
franta-hg@75
    10
        - dist
franta-hg@75
    11
        - execution
franta-hg@75
    12
        - debugging
franta-hg@75
    13
        - javadoc
franta-hg@75
    14
        - junit compilation
franta-hg@75
    15
        - junit execution
franta-hg@75
    16
        - junit debugging
franta-hg@75
    17
        - cleanup
franta-hg@75
    18
franta-hg@75
    19
        -->
franta-hg@75
    20
<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="nekurak.net-rest-impl">
franta-hg@75
    21
    <import file="ant-deploy.xml"/>
franta-hg@75
    22
    <fail message="Please build using Ant 1.7.1 or higher.">
franta-hg@75
    23
        <condition>
franta-hg@75
    24
            <not>
franta-hg@75
    25
                <antversion atleast="1.7.1"/>
franta-hg@75
    26
            </not>
franta-hg@75
    27
        </condition>
franta-hg@75
    28
    </fail>
franta-hg@75
    29
    <target depends="dist,javadoc" description="Build whole project." name="default"/>
franta-hg@75
    30
    <!--
franta-hg@75
    31
                INITIALIZATION SECTION
franta-hg@75
    32
            -->
franta-hg@75
    33
    <target name="-pre-init">
franta-hg@75
    34
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
    35
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
    36
    </target>
franta-hg@75
    37
    <target depends="-pre-init" name="-init-private">
franta-hg@75
    38
        <property file="nbproject/private/private.properties"/>
franta-hg@75
    39
    </target>
franta-hg@75
    40
    <target depends="-pre-init,-init-private" name="-init-user">
franta-hg@75
    41
        <property file="${user.properties.file}"/>
franta-hg@75
    42
        <!-- The two properties below are usually overridden -->
franta-hg@75
    43
        <!-- by the active platform. Just a fallback. -->
franta-hg@75
    44
        <property name="default.javac.source" value="1.4"/>
franta-hg@75
    45
        <property name="default.javac.target" value="1.4"/>
franta-hg@75
    46
    </target>
franta-hg@75
    47
    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
franta-hg@75
    48
        <property file="nbproject/project.properties"/>
franta-hg@75
    49
    </target>
franta-hg@75
    50
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
franta-hg@75
    51
    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
franta-hg@75
    52
        <condition property="have.tests">
franta-hg@75
    53
            <or>
franta-hg@75
    54
                <available file="${test.src.dir}"/>
franta-hg@75
    55
            </or>
franta-hg@75
    56
        </condition>
franta-hg@75
    57
        <condition property="have.sources">
franta-hg@75
    58
            <or>
franta-hg@75
    59
                <available file="${src.dir}"/>
franta-hg@75
    60
            </or>
franta-hg@75
    61
        </condition>
franta-hg@75
    62
        <condition property="netbeans.home+have.tests">
franta-hg@75
    63
            <and>
franta-hg@75
    64
                <isset property="netbeans.home"/>
franta-hg@75
    65
                <isset property="have.tests"/>
franta-hg@75
    66
            </and>
franta-hg@75
    67
        </condition>
franta-hg@75
    68
        <condition property="no.javadoc.preview">
franta-hg@75
    69
            <isfalse value="${javadoc.preview}"/>
franta-hg@75
    70
        </condition>
franta-hg@75
    71
        <property name="javac.compilerargs" value=""/>
franta-hg@75
    72
        <condition property="no.deps">
franta-hg@75
    73
            <and>
franta-hg@75
    74
                <istrue value="${no.dependencies}"/>
franta-hg@75
    75
            </and>
franta-hg@75
    76
        </condition>
franta-hg@75
    77
        <condition property="no.dist.ear.dir">
franta-hg@75
    78
            <not>
franta-hg@75
    79
                <isset property="dist.ear.dir"/>
franta-hg@75
    80
            </not>
franta-hg@75
    81
        </condition>
franta-hg@75
    82
        <property name="build.web.excludes" value="${build.classes.excludes}"/>
franta-hg@75
    83
        <condition property="do.compile.jsps">
franta-hg@75
    84
            <istrue value="${compile.jsps}"/>
franta-hg@75
    85
        </condition>
franta-hg@75
    86
        <condition property="do.debug.server">
franta-hg@75
    87
            <or>
franta-hg@75
    88
                <not>
franta-hg@75
    89
                    <isset property="debug.server"/>
franta-hg@75
    90
                </not>
franta-hg@75
    91
                <istrue value="${debug.server}"/>
franta-hg@75
    92
                <and>
franta-hg@75
    93
                    <not>
franta-hg@75
    94
                        <istrue value="${debug.server}"/>
franta-hg@75
    95
                    </not>
franta-hg@75
    96
                    <not>
franta-hg@75
    97
                        <istrue value="${debug.client}"/>
franta-hg@75
    98
                    </not>
franta-hg@75
    99
                </and>
franta-hg@75
   100
            </or>
franta-hg@75
   101
        </condition>
franta-hg@75
   102
        <condition property="do.debug.client">
franta-hg@75
   103
            <istrue value="${debug.client}"/>
franta-hg@75
   104
        </condition>
franta-hg@75
   105
        <condition property="do.display.browser">
franta-hg@75
   106
            <istrue value="${display.browser}"/>
franta-hg@75
   107
        </condition>
franta-hg@75
   108
        <condition property="do.display.browser.debug">
franta-hg@75
   109
            <and>
franta-hg@75
   110
                <isset property="do.display.browser"/>
franta-hg@75
   111
                <not>
franta-hg@75
   112
                    <isset property="do.debug.client"/>
franta-hg@75
   113
                </not>
franta-hg@75
   114
            </and>
franta-hg@75
   115
        </condition>
franta-hg@75
   116
        <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
franta-hg@75
   117
        <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
franta-hg@75
   118
        <condition property="do.war.package.with.custom.manifest">
franta-hg@75
   119
            <isset property="has.custom.manifest"/>
franta-hg@75
   120
        </condition>
franta-hg@75
   121
        <condition property="do.war.package.without.custom.manifest">
franta-hg@75
   122
            <not>
franta-hg@75
   123
                <isset property="has.custom.manifest"/>
franta-hg@75
   124
            </not>
franta-hg@75
   125
        </condition>
franta-hg@75
   126
        <condition property="do.tmp.war.package.with.custom.manifest">
franta-hg@75
   127
            <and>
franta-hg@75
   128
                <isset property="has.custom.manifest"/>
franta-hg@75
   129
                <or>
franta-hg@75
   130
                    <isfalse value="${directory.deployment.supported}"/>
franta-hg@75
   131
                    <isset property="dist.ear.dir"/>
franta-hg@75
   132
                </or>
franta-hg@75
   133
            </and>
franta-hg@75
   134
        </condition>
franta-hg@75
   135
        <condition property="do.tmp.war.package.without.custom.manifest">
franta-hg@75
   136
            <and>
franta-hg@75
   137
                <not>
franta-hg@75
   138
                    <isset property="has.custom.manifest"/>
franta-hg@75
   139
                </not>
franta-hg@75
   140
                <or>
franta-hg@75
   141
                    <isfalse value="${directory.deployment.supported}"/>
franta-hg@75
   142
                    <isset property="dist.ear.dir"/>
franta-hg@75
   143
                </or>
franta-hg@75
   144
            </and>
franta-hg@75
   145
        </condition>
franta-hg@75
   146
        <condition property="do.tmp.war.package">
franta-hg@75
   147
            <or>
franta-hg@75
   148
                <isfalse value="${directory.deployment.supported}"/>
franta-hg@75
   149
                <isset property="dist.ear.dir"/>
franta-hg@75
   150
            </or>
franta-hg@75
   151
        </condition>
franta-hg@75
   152
        <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
franta-hg@75
   153
        <condition else="" property="application.args.param" value="${application.args}">
franta-hg@75
   154
            <and>
franta-hg@75
   155
                <isset property="application.args"/>
franta-hg@75
   156
                <not>
franta-hg@75
   157
                    <equals arg1="${application.args}" arg2="" trim="true"/>
franta-hg@75
   158
                </not>
franta-hg@75
   159
            </and>
franta-hg@75
   160
        </condition>
franta-hg@75
   161
        <property name="source.encoding" value="${file.encoding}"/>
franta-hg@75
   162
        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
franta-hg@75
   163
            <and>
franta-hg@75
   164
                <isset property="javadoc.encoding"/>
franta-hg@75
   165
                <not>
franta-hg@75
   166
                    <equals arg1="${javadoc.encoding}" arg2=""/>
franta-hg@75
   167
                </not>
franta-hg@75
   168
            </and>
franta-hg@75
   169
        </condition>
franta-hg@75
   170
        <property name="javadoc.encoding.used" value="${source.encoding}"/>
franta-hg@75
   171
        <property name="includes" value="**"/>
franta-hg@75
   172
        <property name="excludes" value=""/>
franta-hg@75
   173
        <property name="runmain.jvmargs" value=""/>
franta-hg@75
   174
        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
franta-hg@75
   175
        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
franta-hg@75
   176
            <length length="0" string="${endorsed.classpath}" when="greater"/>
franta-hg@75
   177
        </condition>
franta-hg@75
   178
    </target>
franta-hg@75
   179
    <target depends="init" name="-init-cos" unless="deploy.on.save">
franta-hg@75
   180
        <condition property="deploy.on.save" value="true">
franta-hg@75
   181
            <istrue value="${j2ee.deploy.on.save}"/>
franta-hg@75
   182
        </condition>
franta-hg@75
   183
    </target>
franta-hg@75
   184
    <target name="-post-init">
franta-hg@75
   185
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   186
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   187
    </target>
franta-hg@75
   188
    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
franta-hg@75
   189
        <fail unless="src.dir">Must set src.dir</fail>
franta-hg@75
   190
        <fail unless="test.src.dir">Must set test.src.dir</fail>
franta-hg@75
   191
        <fail unless="build.dir">Must set build.dir</fail>
franta-hg@75
   192
        <fail unless="build.web.dir">Must set build.web.dir</fail>
franta-hg@75
   193
        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
franta-hg@75
   194
        <fail unless="dist.dir">Must set dist.dir</fail>
franta-hg@75
   195
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
franta-hg@75
   196
        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
franta-hg@75
   197
        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
franta-hg@75
   198
        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
franta-hg@75
   199
        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
franta-hg@75
   200
        <fail unless="dist.war">Must set dist.war</fail>
franta-hg@75
   201
        <fail unless="j2ee.platform.classpath">
franta-hg@75
   202
The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
franta-hg@75
   203
Either open the project in the IDE and assign the server or setup the server classpath manually.
franta-hg@75
   204
For example like this:
franta-hg@75
   205
   ant -Duser.properties.file=&lt;path_to_property_file&gt; (where you put the property "j2ee.platform.classpath" in a .properties file)
franta-hg@75
   206
or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties file is used)
franta-hg@75
   207
                </fail>
franta-hg@75
   208
    </target>
franta-hg@75
   209
    <target name="-init-macrodef-property">
franta-hg@75
   210
        <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@75
   211
            <attribute name="name"/>
franta-hg@75
   212
            <attribute name="value"/>
franta-hg@75
   213
            <sequential>
franta-hg@75
   214
                <property name="@{name}" value="${@{value}}"/>
franta-hg@75
   215
            </sequential>
franta-hg@75
   216
        </macrodef>
franta-hg@75
   217
    </target>
franta-hg@75
   218
    <target name="-init-macrodef-javac">
franta-hg@75
   219
        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@75
   220
            <attribute default="${src.dir}" name="srcdir"/>
franta-hg@75
   221
            <attribute default="${build.classes.dir}" name="destdir"/>
franta-hg@75
   222
            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@75
   223
            <attribute default="${includes}" name="includes"/>
franta-hg@75
   224
            <attribute default="${excludes}" name="excludes"/>
franta-hg@75
   225
            <attribute default="${javac.debug}" name="debug"/>
franta-hg@75
   226
            <attribute default="${empty.dir}" name="gensrcdir"/>
franta-hg@75
   227
            <element name="customize" optional="true"/>
franta-hg@75
   228
            <sequential>
franta-hg@75
   229
                <property location="${build.dir}/empty" name="empty.dir"/>
franta-hg@75
   230
                <mkdir dir="${empty.dir}"/>
franta-hg@75
   231
                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
franta-hg@75
   232
                    <src>
franta-hg@75
   233
                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
franta-hg@75
   234
                            <include name="*"/>
franta-hg@75
   235
                        </dirset>
franta-hg@75
   236
                    </src>
franta-hg@75
   237
                    <classpath>
franta-hg@75
   238
                        <path path="@{classpath}"/>
franta-hg@75
   239
                    </classpath>
franta-hg@75
   240
                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@75
   241
                    <compilerarg line="${javac.compilerargs}"/>
franta-hg@75
   242
                    <customize/>
franta-hg@75
   243
                </javac>
franta-hg@75
   244
            </sequential>
franta-hg@75
   245
        </macrodef>
franta-hg@75
   246
    </target>
franta-hg@75
   247
    <target name="-init-macrodef-junit">
franta-hg@75
   248
        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
franta-hg@75
   249
            <attribute default="${includes}" name="includes"/>
franta-hg@75
   250
            <attribute default="${excludes}" name="excludes"/>
franta-hg@75
   251
            <attribute default="**" name="testincludes"/>
franta-hg@75
   252
            <sequential>
franta-hg@75
   253
                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
franta-hg@75
   254
                    <batchtest todir="${build.test.results.dir}">
franta-hg@75
   255
                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
franta-hg@75
   256
                            <filename name="@{testincludes}"/>
franta-hg@75
   257
                        </fileset>
franta-hg@75
   258
                    </batchtest>
franta-hg@75
   259
                    <classpath>
franta-hg@75
   260
                        <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
franta-hg@75
   261
                    </classpath>
franta-hg@75
   262
                    <syspropertyset>
franta-hg@75
   263
                        <propertyref prefix="test-sys-prop."/>
franta-hg@75
   264
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
franta-hg@75
   265
                    </syspropertyset>
franta-hg@75
   266
                    <formatter type="brief" usefile="false"/>
franta-hg@75
   267
                    <formatter type="xml"/>
franta-hg@75
   268
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@75
   269
                    <jvmarg line="${runmain.jvmargs}"/>
franta-hg@75
   270
                </junit>
franta-hg@75
   271
            </sequential>
franta-hg@75
   272
        </macrodef>
franta-hg@75
   273
    </target>
franta-hg@75
   274
    <target name="-init-macrodef-java">
franta-hg@75
   275
        <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@75
   276
            <attribute default="${main.class}" name="classname"/>
franta-hg@75
   277
            <attribute default="${debug.classpath}" name="classpath"/>
franta-hg@75
   278
            <element name="customize" optional="true"/>
franta-hg@75
   279
            <sequential>
franta-hg@75
   280
                <java classname="@{classname}" fork="true">
franta-hg@75
   281
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@75
   282
                    <jvmarg line="${runmain.jvmargs}"/>
franta-hg@75
   283
                    <classpath>
franta-hg@75
   284
                        <path path="@{classpath}:${j2ee.platform.classpath}"/>
franta-hg@75
   285
                    </classpath>
franta-hg@75
   286
                    <syspropertyset>
franta-hg@75
   287
                        <propertyref prefix="run-sys-prop."/>
franta-hg@75
   288
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@75
   289
                    </syspropertyset>
franta-hg@75
   290
                    <customize/>
franta-hg@75
   291
                </java>
franta-hg@75
   292
            </sequential>
franta-hg@75
   293
        </macrodef>
franta-hg@75
   294
    </target>
franta-hg@75
   295
    <target name="-init-macrodef-nbjsdebug">
franta-hg@75
   296
        <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@75
   297
            <attribute default="${client.url}" name="webUrl"/>
franta-hg@75
   298
            <sequential>
franta-hg@75
   299
                <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
franta-hg@75
   300
            </sequential>
franta-hg@75
   301
        </macrodef>
franta-hg@75
   302
    </target>
franta-hg@75
   303
    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
franta-hg@75
   304
        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@75
   305
            <attribute default="${main.class}" name="name"/>
franta-hg@75
   306
            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@75
   307
            <sequential>
franta-hg@75
   308
                <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
franta-hg@75
   309
                    <classpath>
franta-hg@75
   310
                        <path path="@{classpath}"/>
franta-hg@75
   311
                    </classpath>
franta-hg@75
   312
                </nbjpdastart>
franta-hg@75
   313
            </sequential>
franta-hg@75
   314
        </macrodef>
franta-hg@75
   315
        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@75
   316
            <attribute default="${build.classes.dir}" name="dir"/>
franta-hg@75
   317
            <sequential>
franta-hg@75
   318
                <nbjpdareload>
franta-hg@75
   319
                    <fileset dir="@{dir}" includes="${fix.classes}">
franta-hg@75
   320
                        <include name="${fix.includes}*.class"/>
franta-hg@75
   321
                    </fileset>
franta-hg@75
   322
                </nbjpdareload>
franta-hg@75
   323
            </sequential>
franta-hg@75
   324
        </macrodef>
franta-hg@75
   325
        <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@75
   326
            <sequential>
franta-hg@75
   327
                <nbjpdaappreloaded/>
franta-hg@75
   328
            </sequential>
franta-hg@75
   329
        </macrodef>
franta-hg@75
   330
    </target>
franta-hg@75
   331
    <target name="-init-debug-args">
franta-hg@75
   332
        <property name="version-output" value="java version &quot;${ant.java.version}"/>
franta-hg@75
   333
        <condition property="have-jdk-older-than-1.4">
franta-hg@75
   334
            <or>
franta-hg@75
   335
                <contains string="${version-output}" substring="java version &quot;1.0"/>
franta-hg@75
   336
                <contains string="${version-output}" substring="java version &quot;1.1"/>
franta-hg@75
   337
                <contains string="${version-output}" substring="java version &quot;1.2"/>
franta-hg@75
   338
                <contains string="${version-output}" substring="java version &quot;1.3"/>
franta-hg@75
   339
            </or>
franta-hg@75
   340
        </condition>
franta-hg@75
   341
        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
franta-hg@75
   342
            <istrue value="${have-jdk-older-than-1.4}"/>
franta-hg@75
   343
        </condition>
franta-hg@75
   344
        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
franta-hg@75
   345
            <os family="windows"/>
franta-hg@75
   346
        </condition>
franta-hg@75
   347
        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
franta-hg@75
   348
            <isset property="debug.transport"/>
franta-hg@75
   349
        </condition>
franta-hg@75
   350
    </target>
franta-hg@75
   351
    <target depends="-init-debug-args" name="-init-macrodef-debug">
franta-hg@75
   352
        <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
franta-hg@75
   353
            <attribute default="${main.class}" name="classname"/>
franta-hg@75
   354
            <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
franta-hg@75
   355
            <attribute default="${application.args.param}" name="args"/>
franta-hg@75
   356
            <element name="customize" optional="true"/>
franta-hg@75
   357
            <sequential>
franta-hg@75
   358
                <java classname="@{classname}" fork="true">
franta-hg@75
   359
                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@75
   360
                    <jvmarg line="${debug-args-line}"/>
franta-hg@75
   361
                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
franta-hg@75
   362
                    <jvmarg line="${runmain.jvmargs}"/>
franta-hg@75
   363
                    <classpath>
franta-hg@75
   364
                        <path path="@{classpath}"/>
franta-hg@75
   365
                    </classpath>
franta-hg@75
   366
                    <syspropertyset>
franta-hg@75
   367
                        <propertyref prefix="run-sys-prop."/>
franta-hg@75
   368
                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@75
   369
                    </syspropertyset>
franta-hg@75
   370
                    <arg line="@{args}"/>
franta-hg@75
   371
                    <customize/>
franta-hg@75
   372
                </java>
franta-hg@75
   373
            </sequential>
franta-hg@75
   374
        </macrodef>
franta-hg@75
   375
    </target>
franta-hg@75
   376
    <target name="-init-taskdefs">
franta-hg@75
   377
        <fail unless="libs.CopyLibs.classpath">
franta-hg@75
   378
The libs.CopyLibs.classpath property is not set up.
franta-hg@75
   379
This property must point to 
franta-hg@75
   380
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
franta-hg@75
   381
of NetBeans IDE installation and is usually located at 
franta-hg@75
   382
&lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
franta-hg@75
   383
Either open the project in the IDE and make sure CopyLibs library
franta-hg@75
   384
exists or setup the property manually. For example like this:
franta-hg@75
   385
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
franta-hg@75
   386
                </fail>
franta-hg@75
   387
        <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
franta-hg@75
   388
    </target>
franta-hg@75
   389
    <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-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs" name="init"/>
franta-hg@75
   390
    <!--
franta-hg@75
   391
                COMPILATION SECTION
franta-hg@75
   392
            -->
franta-hg@75
   393
    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
franta-hg@75
   394
    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
franta-hg@75
   395
    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
franta-hg@75
   396
    <target depends="init,deps-jar" name="-pre-pre-compile">
franta-hg@75
   397
        <mkdir dir="${build.classes.dir}"/>
franta-hg@75
   398
    </target>
franta-hg@75
   399
    <target name="-pre-compile">
franta-hg@75
   400
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   401
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   402
    </target>
franta-hg@75
   403
    <target name="-copy-webdir">
franta-hg@75
   404
        <copy todir="${build.web.dir}">
franta-hg@75
   405
            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   406
        </copy>
franta-hg@75
   407
        <copy todir="${build.web.dir}/WEB-INF">
franta-hg@75
   408
            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
franta-hg@75
   409
        </copy>
franta-hg@75
   410
    </target>
franta-hg@75
   411
    <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile">
franta-hg@75
   412
        <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
franta-hg@75
   413
        <copy todir="${build.classes.dir}">
franta-hg@75
   414
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   415
        </copy>
franta-hg@75
   416
    </target>
franta-hg@75
   417
    <target if="has.custom.manifest" name="-copy-manifest">
franta-hg@75
   418
        <mkdir dir="${build.meta.inf.dir}"/>
franta-hg@75
   419
        <copy todir="${build.meta.inf.dir}">
franta-hg@75
   420
            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
franta-hg@75
   421
        </copy>
franta-hg@75
   422
    </target>
franta-hg@75
   423
    <target if="has.persistence.xml" name="-copy-persistence-xml">
franta-hg@75
   424
        <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
franta-hg@75
   425
        <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
franta-hg@75
   426
            <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
franta-hg@75
   427
        </copy>
franta-hg@75
   428
    </target>
franta-hg@75
   429
    <target name="-post-compile">
franta-hg@75
   430
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   431
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   432
    </target>
franta-hg@75
   433
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
franta-hg@75
   434
    <target name="-pre-compile-single">
franta-hg@75
   435
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   436
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   437
    </target>
franta-hg@75
   438
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
franta-hg@75
   439
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
franta-hg@75
   440
        <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
franta-hg@75
   441
        <copy todir="${build.classes.dir}">
franta-hg@75
   442
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   443
        </copy>
franta-hg@75
   444
    </target>
franta-hg@75
   445
    <target name="-post-compile-single">
franta-hg@75
   446
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   447
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   448
    </target>
franta-hg@75
   449
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
franta-hg@75
   450
    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
franta-hg@75
   451
        <mkdir dir="${build.generated.dir}/src"/>
franta-hg@75
   452
        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
franta-hg@75
   453
            <arg value="-uriroot"/>
franta-hg@75
   454
            <arg file="${basedir}/${build.web.dir}"/>
franta-hg@75
   455
            <arg value="-d"/>
franta-hg@75
   456
            <arg file="${basedir}/${build.generated.dir}/src"/>
franta-hg@75
   457
            <arg value="-die1"/>
franta-hg@75
   458
            <arg value="-compilerSourceVM ${javac.source}"/>
franta-hg@75
   459
            <arg value="-compilerTargetVM ${javac.target}"/>
franta-hg@75
   460
            <arg value="-javaEncoding ${source.encoding}"/>
franta-hg@75
   461
            <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
franta-hg@75
   462
        </java>
franta-hg@75
   463
        <mkdir dir="${build.generated.dir}/classes"/>
franta-hg@75
   464
        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
franta-hg@75
   465
    </target>
franta-hg@75
   466
    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
franta-hg@75
   467
        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
franta-hg@75
   468
        <mkdir dir="${build.generated.dir}/src"/>
franta-hg@75
   469
        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
franta-hg@75
   470
            <arg value="-uriroot"/>
franta-hg@75
   471
            <arg file="${basedir}/${build.web.dir}"/>
franta-hg@75
   472
            <arg value="-d"/>
franta-hg@75
   473
            <arg file="${basedir}/${build.generated.dir}/src"/>
franta-hg@75
   474
            <arg value="-die1"/>
franta-hg@75
   475
            <arg value="-jspc.files"/>
franta-hg@75
   476
            <arg path="${jsp.includes}"/>
franta-hg@75
   477
            <arg value="-compilerSourceVM ${javac.source}"/>
franta-hg@75
   478
            <arg value="-compilerTargetVM ${javac.target}"/>
franta-hg@75
   479
            <arg value="-javaEncoding ${source.encoding}"/>
franta-hg@75
   480
            <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
franta-hg@75
   481
        </java>
franta-hg@75
   482
        <mkdir dir="${build.generated.dir}/classes"/>
franta-hg@75
   483
        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
franta-hg@75
   484
            <customize>
franta-hg@75
   485
                <patternset includes="${javac.jsp.includes}"/>
franta-hg@75
   486
            </customize>
franta-hg@75
   487
        </webproject2:javac>
franta-hg@75
   488
    </target>
franta-hg@75
   489
    <target name="compile-single-jsp">
franta-hg@75
   490
        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
franta-hg@75
   491
        <antcall target="-do-compile-single-jsp"/>
franta-hg@75
   492
    </target>
franta-hg@75
   493
    <!--
franta-hg@75
   494
                DIST BUILDING SECTION
franta-hg@75
   495
            -->
franta-hg@75
   496
    <target name="-pre-dist">
franta-hg@75
   497
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   498
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   499
    </target>
franta-hg@75
   500
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
franta-hg@75
   501
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@75
   502
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   503
        <jar compress="${jar.compress}" jarfile="${dist.war}">
franta-hg@75
   504
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   505
        </jar>
franta-hg@75
   506
    </target>
franta-hg@75
   507
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
franta-hg@75
   508
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@75
   509
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   510
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
franta-hg@75
   511
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   512
        </jar>
franta-hg@75
   513
    </target>
franta-hg@75
   514
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
franta-hg@75
   515
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@75
   516
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   517
        <jar compress="${jar.compress}" jarfile="${dist.war}">
franta-hg@75
   518
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   519
        </jar>
franta-hg@75
   520
    </target>
franta-hg@75
   521
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
franta-hg@75
   522
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@75
   523
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   524
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
franta-hg@75
   525
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   526
        </jar>
franta-hg@75
   527
    </target>
franta-hg@75
   528
    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
franta-hg@75
   529
    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
franta-hg@75
   530
        <mkdir dir="${build.web.dir}/META-INF"/>
franta-hg@75
   531
        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
franta-hg@75
   532
    </target>
franta-hg@75
   533
    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"/>
franta-hg@75
   534
    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
franta-hg@75
   535
        <delete dir="${build.web.dir}/WEB-INF/lib"/>
franta-hg@75
   536
    </target>
franta-hg@75
   537
    <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
franta-hg@75
   538
        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
franta-hg@75
   539
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   540
        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
franta-hg@75
   541
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   542
        </jar>
franta-hg@75
   543
    </target>
franta-hg@75
   544
    <target name="-post-dist">
franta-hg@75
   545
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   546
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   547
    </target>
franta-hg@75
   548
    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
franta-hg@75
   549
    <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
franta-hg@75
   550
    <!--
franta-hg@75
   551
                EXECUTION SECTION
franta-hg@75
   552
            -->
franta-hg@75
   553
    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
franta-hg@75
   554
    <target name="-pre-run-deploy">
franta-hg@75
   555
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   556
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   557
    </target>
franta-hg@75
   558
    <target name="-post-run-deploy">
franta-hg@75
   559
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   560
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   561
    </target>
franta-hg@75
   562
    <target name="-pre-nbmodule-run-deploy">
franta-hg@75
   563
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   564
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
franta-hg@75
   565
    </target>
franta-hg@75
   566
    <target name="-post-nbmodule-run-deploy">
franta-hg@75
   567
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   568
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
franta-hg@75
   569
    </target>
franta-hg@75
   570
    <target name="-run-deploy-am">
franta-hg@75
   571
        <!-- Task to deploy to the Access Manager runtime. -->
franta-hg@75
   572
    </target>
franta-hg@75
   573
    <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy" name="run-deploy">
franta-hg@75
   574
        <nbjpdaappreloaded/>
franta-hg@75
   575
    </target>
franta-hg@75
   576
    <target if="netbeans.home" name="-run-deploy-nb">
franta-hg@75
   577
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
franta-hg@75
   578
    </target>
franta-hg@75
   579
    <target name="-init-deploy-ant" unless="netbeans.home">
franta-hg@75
   580
        <property name="deploy.ant.archive" value="${dist.war}"/>
franta-hg@75
   581
        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
franta-hg@75
   582
        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
franta-hg@75
   583
        <property name="deploy.ant.enabled" value="true"/>
franta-hg@75
   584
    </target>
franta-hg@75
   585
    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
franta-hg@75
   586
    <target if="netbeans.home" name="-run-undeploy-nb">
franta-hg@75
   587
        <fail message="Undeploy is not supported from within the IDE"/>
franta-hg@75
   588
    </target>
franta-hg@75
   589
    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
franta-hg@75
   590
        <nbverify file="${dist.war}"/>
franta-hg@75
   591
    </target>
franta-hg@75
   592
    <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
franta-hg@75
   593
    <target if="do.display.browser" name="-init-display-browser">
franta-hg@75
   594
        <condition property="do.display.browser.nb">
franta-hg@75
   595
            <isset property="netbeans.home"/>
franta-hg@75
   596
        </condition>
franta-hg@75
   597
        <condition property="do.display.browser.cl">
franta-hg@75
   598
            <isset property="deploy.ant.enabled"/>
franta-hg@75
   599
        </condition>
franta-hg@75
   600
    </target>
franta-hg@75
   601
    <target if="do.display.browser.nb" name="-display-browser-nb">
franta-hg@75
   602
        <nbbrowse url="${client.url}"/>
franta-hg@75
   603
    </target>
franta-hg@75
   604
    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
franta-hg@75
   605
        <condition property="browser" value="rundll32">
franta-hg@75
   606
            <os family="windows"/>
franta-hg@75
   607
        </condition>
franta-hg@75
   608
        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
franta-hg@75
   609
            <os family="windows"/>
franta-hg@75
   610
        </condition>
franta-hg@75
   611
        <condition property="browser" value="/usr/bin/open">
franta-hg@75
   612
            <os family="mac"/>
franta-hg@75
   613
        </condition>
franta-hg@75
   614
        <property environment="env"/>
franta-hg@75
   615
        <condition property="browser" value="${env.BROWSER}">
franta-hg@75
   616
            <isset property="env.BROWSER"/>
franta-hg@75
   617
        </condition>
franta-hg@75
   618
        <condition property="browser" value="/usr/bin/firefox">
franta-hg@75
   619
            <available file="/usr/bin/firefox"/>
franta-hg@75
   620
        </condition>
franta-hg@75
   621
        <condition property="browser" value="/usr/local/firefox/firefox">
franta-hg@75
   622
            <available file="/usr/local/firefox/firefox"/>
franta-hg@75
   623
        </condition>
franta-hg@75
   624
        <condition property="browser" value="/usr/bin/mozilla">
franta-hg@75
   625
            <available file="/usr/bin/mozilla"/>
franta-hg@75
   626
        </condition>
franta-hg@75
   627
        <condition property="browser" value="/usr/local/mozilla/mozilla">
franta-hg@75
   628
            <available file="/usr/local/mozilla/mozilla"/>
franta-hg@75
   629
        </condition>
franta-hg@75
   630
        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
franta-hg@75
   631
            <available file="/usr/sfw/lib/firefox/firefox"/>
franta-hg@75
   632
        </condition>
franta-hg@75
   633
        <condition property="browser" value="/opt/csw/bin/firefox">
franta-hg@75
   634
            <available file="/opt/csw/bin/firefox"/>
franta-hg@75
   635
        </condition>
franta-hg@75
   636
        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
franta-hg@75
   637
            <available file="/usr/sfw/lib/mozilla/mozilla"/>
franta-hg@75
   638
        </condition>
franta-hg@75
   639
        <condition property="browser" value="/opt/csw/bin/mozilla">
franta-hg@75
   640
            <available file="/opt/csw/bin/mozilla"/>
franta-hg@75
   641
        </condition>
franta-hg@75
   642
    </target>
franta-hg@75
   643
    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
franta-hg@75
   644
        <fail unless="browser">
franta-hg@75
   645
                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
franta-hg@75
   646
                </fail>
franta-hg@75
   647
        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
franta-hg@75
   648
        <echo>Launching ${browse.url}</echo>
franta-hg@75
   649
        <exec executable="${browser}" spawn="true">
franta-hg@75
   650
            <arg line="${browser.args} ${browse.url}"/>
franta-hg@75
   651
        </exec>
franta-hg@75
   652
    </target>
franta-hg@75
   653
    <target depends="init,-init-cos,compile-single" name="run-main">
franta-hg@75
   654
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
franta-hg@75
   655
        <webproject1:java classname="${run.class}"/>
franta-hg@75
   656
    </target>
franta-hg@75
   657
    <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
franta-hg@75
   658
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
franta-hg@75
   659
        <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
franta-hg@75
   660
    </target>
franta-hg@75
   661
    <!--
franta-hg@75
   662
                DEBUGGING SECTION
franta-hg@75
   663
            -->
franta-hg@75
   664
    <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
franta-hg@75
   665
        <nbstartserver debugmode="true"/>
franta-hg@75
   666
        <antcall target="connect-debugger"/>
franta-hg@75
   667
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
franta-hg@75
   668
        <antcall target="debug-display-browser"/>
franta-hg@75
   669
        <antcall target="connect-client-debugger"/>
franta-hg@75
   670
    </target>
franta-hg@75
   671
    <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
franta-hg@75
   672
        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
franta-hg@75
   673
            <classpath>
franta-hg@75
   674
                <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
franta-hg@75
   675
            </classpath>
franta-hg@75
   676
            <sourcepath>
franta-hg@75
   677
                <path path="${web.docbase.dir}"/>
franta-hg@75
   678
            </sourcepath>
franta-hg@75
   679
        </nbjpdaconnect>
franta-hg@75
   680
    </target>
franta-hg@75
   681
    <target if="do.display.browser.debug" name="debug-display-browser">
franta-hg@75
   682
        <nbbrowse url="${client.url}"/>
franta-hg@75
   683
    </target>
franta-hg@75
   684
    <target if="do.debug.client" name="connect-client-debugger">
franta-hg@75
   685
        <webproject1:nbjsdebugstart webUrl="${client.url}"/>
franta-hg@75
   686
    </target>
franta-hg@75
   687
    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
franta-hg@75
   688
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
franta-hg@75
   689
        <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
franta-hg@75
   690
    </target>
franta-hg@75
   691
    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
franta-hg@75
   692
    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
franta-hg@75
   693
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
franta-hg@75
   694
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
franta-hg@75
   695
    </target>
franta-hg@75
   696
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
franta-hg@75
   697
        <webproject1:nbjpdastart name="${debug.class}"/>
franta-hg@75
   698
    </target>
franta-hg@75
   699
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
franta-hg@75
   700
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
franta-hg@75
   701
        <webproject1:debug classname="${debug.class}"/>
franta-hg@75
   702
    </target>
franta-hg@75
   703
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
franta-hg@75
   704
    <target depends="init" name="-pre-debug-fix">
franta-hg@75
   705
        <fail unless="fix.includes">Must set fix.includes</fail>
franta-hg@75
   706
        <property name="javac.includes" value="${fix.includes}.java"/>
franta-hg@75
   707
    </target>
franta-hg@75
   708
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
franta-hg@75
   709
        <webproject1:nbjpdareload/>
franta-hg@75
   710
    </target>
franta-hg@75
   711
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
franta-hg@75
   712
    <!--
franta-hg@75
   713
                JAVADOC SECTION
franta-hg@75
   714
            -->
franta-hg@75
   715
    <target depends="init" name="javadoc-build">
franta-hg@75
   716
        <mkdir dir="${dist.javadoc.dir}"/>
franta-hg@75
   717
        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
franta-hg@75
   718
            <classpath>
franta-hg@75
   719
                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
franta-hg@75
   720
            </classpath>
franta-hg@75
   721
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
franta-hg@75
   722
                <filename name="**/*.java"/>
franta-hg@75
   723
            </fileset>
franta-hg@75
   724
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
franta-hg@75
   725
                <include name="**/*.java"/>
franta-hg@75
   726
            </fileset>
franta-hg@75
   727
        </javadoc>
franta-hg@75
   728
    </target>
franta-hg@75
   729
    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
franta-hg@75
   730
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
franta-hg@75
   731
    </target>
franta-hg@75
   732
    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
franta-hg@75
   733
    <!--
franta-hg@75
   734
                
franta-hg@75
   735
                JUNIT COMPILATION SECTION
franta-hg@75
   736
            -->
franta-hg@75
   737
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
franta-hg@75
   738
        <mkdir dir="${build.test.classes.dir}"/>
franta-hg@75
   739
        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
franta-hg@75
   740
    </target>
franta-hg@75
   741
    <target name="-pre-compile-test">
franta-hg@75
   742
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   743
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   744
    </target>
franta-hg@75
   745
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
franta-hg@75
   746
        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
franta-hg@75
   747
        <copy todir="${build.test.classes.dir}">
franta-hg@75
   748
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   749
        </copy>
franta-hg@75
   750
    </target>
franta-hg@75
   751
    <target name="-post-compile-test">
franta-hg@75
   752
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   753
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   754
    </target>
franta-hg@75
   755
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
franta-hg@75
   756
    <target name="-pre-compile-test-single">
franta-hg@75
   757
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   758
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   759
    </target>
franta-hg@75
   760
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
franta-hg@75
   761
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
franta-hg@75
   762
        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
franta-hg@75
   763
        <copy todir="${build.test.classes.dir}">
franta-hg@75
   764
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   765
        </copy>
franta-hg@75
   766
    </target>
franta-hg@75
   767
    <target name="-post-compile-test-single">
franta-hg@75
   768
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   769
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   770
    </target>
franta-hg@75
   771
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
franta-hg@75
   772
    <!--
franta-hg@75
   773
                
franta-hg@75
   774
                JUNIT EXECUTION SECTION
franta-hg@75
   775
            -->
franta-hg@75
   776
    <target depends="init" if="have.tests" name="-pre-test-run">
franta-hg@75
   777
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@75
   778
    </target>
franta-hg@75
   779
    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
franta-hg@75
   780
        <webproject2:junit testincludes="**/*Test.java"/>
franta-hg@75
   781
    </target>
franta-hg@75
   782
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
franta-hg@75
   783
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@75
   784
    </target>
franta-hg@75
   785
    <target depends="init" if="have.tests" name="test-report"/>
franta-hg@75
   786
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
franta-hg@75
   787
    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
franta-hg@75
   788
    <target depends="init" if="have.tests" name="-pre-test-run-single">
franta-hg@75
   789
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@75
   790
    </target>
franta-hg@75
   791
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
franta-hg@75
   792
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
franta-hg@75
   793
        <webproject2:junit excludes="" includes="${test.includes}"/>
franta-hg@75
   794
    </target>
franta-hg@75
   795
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
franta-hg@75
   796
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@75
   797
    </target>
franta-hg@75
   798
    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
franta-hg@75
   799
    <!--
franta-hg@75
   800
                
franta-hg@75
   801
                JUNIT DEBUGGING SECTION
franta-hg@75
   802
            -->
franta-hg@75
   803
    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
franta-hg@75
   804
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
franta-hg@75
   805
        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
franta-hg@75
   806
        <delete file="${test.report.file}"/>
franta-hg@75
   807
        <!-- must exist, otherwise the XML formatter would fail -->
franta-hg@75
   808
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@75
   809
        <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
franta-hg@75
   810
            <customize>
franta-hg@75
   811
                <arg value="showoutput=true"/>
franta-hg@75
   812
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
franta-hg@75
   813
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
franta-hg@75
   814
            </customize>
franta-hg@75
   815
        </webproject1:debug>
franta-hg@75
   816
    </target>
franta-hg@75
   817
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
franta-hg@75
   818
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
franta-hg@75
   819
    </target>
franta-hg@75
   820
    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
franta-hg@75
   821
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
franta-hg@75
   822
        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
franta-hg@75
   823
    </target>
franta-hg@75
   824
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
franta-hg@75
   825
    <!--
franta-hg@75
   826
                
franta-hg@75
   827
                CLEANUP SECTION
franta-hg@75
   828
            -->
franta-hg@75
   829
    <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
franta-hg@75
   830
    <target depends="init" name="do-clean">
franta-hg@75
   831
        <condition property="build.dir.to.clean" value="${build.web.dir}">
franta-hg@75
   832
            <isset property="dist.ear.dir"/>
franta-hg@75
   833
        </condition>
franta-hg@75
   834
        <property name="build.dir.to.clean" value="${build.web.dir}"/>
franta-hg@75
   835
        <delete includeEmptyDirs="true" quiet="true">
franta-hg@75
   836
            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
franta-hg@75
   837
        </delete>
franta-hg@75
   838
        <delete dir="${build.dir}"/>
franta-hg@75
   839
        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
franta-hg@75
   840
        <delete dir="${dist.dir}"/>
franta-hg@75
   841
    </target>
franta-hg@75
   842
    <target depends="do-clean" if="status.clean-failed" name="check-clean">
franta-hg@75
   843
        <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
franta-hg@75
   844
        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
franta-hg@75
   845
    </target>
franta-hg@75
   846
    <target depends="init" if="netbeans.home" name="undeploy-clean">
franta-hg@75
   847
        <nbundeploy failOnError="false" startServer="false"/>
franta-hg@75
   848
    </target>
franta-hg@75
   849
    <target name="-post-clean">
franta-hg@75
   850
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   851
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   852
    </target>
franta-hg@75
   853
    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
franta-hg@75
   854
    <target depends="clean" description="Clean build products." name="clean-ear"/>
franta-hg@75
   855
</project>