java/nekurak.net-rest/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Tue, 23 Mar 2010 01:12:16 +0100
changeset 77 5378f8dc8fa9
parent 75 18ed62105526
permissions -rw-r--r--
ClanekREST.java
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@77
   393
    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps">
franta-hg@77
   394
        <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="jar">
franta-hg@77
   395
            <property name="deploy.on.save" value="false"/>
franta-hg@77
   396
        </ant>
franta-hg@77
   397
    </target>
franta-hg@77
   398
    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
franta-hg@77
   399
        <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="jar">
franta-hg@77
   400
            <property name="deploy.on.save" value="false"/>
franta-hg@77
   401
        </ant>
franta-hg@77
   402
    </target>
franta-hg@75
   403
    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
franta-hg@75
   404
    <target depends="init,deps-jar" name="-pre-pre-compile">
franta-hg@75
   405
        <mkdir dir="${build.classes.dir}"/>
franta-hg@75
   406
    </target>
franta-hg@75
   407
    <target name="-pre-compile">
franta-hg@75
   408
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   409
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   410
    </target>
franta-hg@75
   411
    <target name="-copy-webdir">
franta-hg@75
   412
        <copy todir="${build.web.dir}">
franta-hg@75
   413
            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   414
        </copy>
franta-hg@75
   415
        <copy todir="${build.web.dir}/WEB-INF">
franta-hg@75
   416
            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
franta-hg@75
   417
        </copy>
franta-hg@75
   418
    </target>
franta-hg@75
   419
    <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
   420
        <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
franta-hg@75
   421
        <copy todir="${build.classes.dir}">
franta-hg@75
   422
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   423
        </copy>
franta-hg@75
   424
    </target>
franta-hg@75
   425
    <target if="has.custom.manifest" name="-copy-manifest">
franta-hg@75
   426
        <mkdir dir="${build.meta.inf.dir}"/>
franta-hg@75
   427
        <copy todir="${build.meta.inf.dir}">
franta-hg@75
   428
            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
franta-hg@75
   429
        </copy>
franta-hg@75
   430
    </target>
franta-hg@75
   431
    <target if="has.persistence.xml" name="-copy-persistence-xml">
franta-hg@75
   432
        <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
franta-hg@75
   433
        <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
franta-hg@75
   434
            <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
franta-hg@75
   435
        </copy>
franta-hg@75
   436
    </target>
franta-hg@75
   437
    <target name="-post-compile">
franta-hg@75
   438
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   439
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   440
    </target>
franta-hg@75
   441
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
franta-hg@75
   442
    <target name="-pre-compile-single">
franta-hg@75
   443
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   444
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   445
    </target>
franta-hg@75
   446
    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
franta-hg@75
   447
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
franta-hg@75
   448
        <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
franta-hg@75
   449
        <copy todir="${build.classes.dir}">
franta-hg@75
   450
            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   451
        </copy>
franta-hg@75
   452
    </target>
franta-hg@75
   453
    <target name="-post-compile-single">
franta-hg@75
   454
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   455
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   456
    </target>
franta-hg@75
   457
    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
franta-hg@75
   458
    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
franta-hg@75
   459
        <mkdir dir="${build.generated.dir}/src"/>
franta-hg@75
   460
        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
franta-hg@75
   461
            <arg value="-uriroot"/>
franta-hg@75
   462
            <arg file="${basedir}/${build.web.dir}"/>
franta-hg@75
   463
            <arg value="-d"/>
franta-hg@75
   464
            <arg file="${basedir}/${build.generated.dir}/src"/>
franta-hg@75
   465
            <arg value="-die1"/>
franta-hg@75
   466
            <arg value="-compilerSourceVM ${javac.source}"/>
franta-hg@75
   467
            <arg value="-compilerTargetVM ${javac.target}"/>
franta-hg@75
   468
            <arg value="-javaEncoding ${source.encoding}"/>
franta-hg@75
   469
            <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
franta-hg@75
   470
        </java>
franta-hg@75
   471
        <mkdir dir="${build.generated.dir}/classes"/>
franta-hg@75
   472
        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
franta-hg@75
   473
    </target>
franta-hg@75
   474
    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
franta-hg@75
   475
        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
franta-hg@75
   476
        <mkdir dir="${build.generated.dir}/src"/>
franta-hg@75
   477
        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
franta-hg@75
   478
            <arg value="-uriroot"/>
franta-hg@75
   479
            <arg file="${basedir}/${build.web.dir}"/>
franta-hg@75
   480
            <arg value="-d"/>
franta-hg@75
   481
            <arg file="${basedir}/${build.generated.dir}/src"/>
franta-hg@75
   482
            <arg value="-die1"/>
franta-hg@75
   483
            <arg value="-jspc.files"/>
franta-hg@75
   484
            <arg path="${jsp.includes}"/>
franta-hg@75
   485
            <arg value="-compilerSourceVM ${javac.source}"/>
franta-hg@75
   486
            <arg value="-compilerTargetVM ${javac.target}"/>
franta-hg@75
   487
            <arg value="-javaEncoding ${source.encoding}"/>
franta-hg@75
   488
            <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
franta-hg@75
   489
        </java>
franta-hg@75
   490
        <mkdir dir="${build.generated.dir}/classes"/>
franta-hg@75
   491
        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
franta-hg@75
   492
            <customize>
franta-hg@75
   493
                <patternset includes="${javac.jsp.includes}"/>
franta-hg@75
   494
            </customize>
franta-hg@75
   495
        </webproject2:javac>
franta-hg@75
   496
    </target>
franta-hg@75
   497
    <target name="compile-single-jsp">
franta-hg@75
   498
        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
franta-hg@75
   499
        <antcall target="-do-compile-single-jsp"/>
franta-hg@75
   500
    </target>
franta-hg@75
   501
    <!--
franta-hg@75
   502
                DIST BUILDING SECTION
franta-hg@75
   503
            -->
franta-hg@75
   504
    <target name="-pre-dist">
franta-hg@75
   505
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   506
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   507
    </target>
franta-hg@75
   508
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
franta-hg@75
   509
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@75
   510
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   511
        <jar compress="${jar.compress}" jarfile="${dist.war}">
franta-hg@75
   512
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   513
        </jar>
franta-hg@75
   514
    </target>
franta-hg@75
   515
    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
franta-hg@75
   516
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@75
   517
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   518
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
franta-hg@75
   519
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   520
        </jar>
franta-hg@75
   521
    </target>
franta-hg@75
   522
    <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
   523
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@75
   524
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   525
        <jar compress="${jar.compress}" jarfile="${dist.war}">
franta-hg@75
   526
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   527
        </jar>
franta-hg@75
   528
    </target>
franta-hg@75
   529
    <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
   530
        <dirname file="${dist.war}" property="dist.jar.dir"/>
franta-hg@75
   531
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   532
        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
franta-hg@75
   533
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   534
        </jar>
franta-hg@75
   535
    </target>
franta-hg@75
   536
    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
franta-hg@75
   537
    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
franta-hg@77
   538
        <copyfiles files="${reference.nekurak_net-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
franta-hg@75
   539
        <mkdir dir="${build.web.dir}/META-INF"/>
franta-hg@75
   540
        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
franta-hg@75
   541
    </target>
franta-hg@77
   542
    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
franta-hg@77
   543
        <copyfiles files="${reference.nekurak_net-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
franta-hg@77
   544
    </target>
franta-hg@75
   545
    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
franta-hg@75
   546
        <delete dir="${build.web.dir}/WEB-INF/lib"/>
franta-hg@75
   547
    </target>
franta-hg@75
   548
    <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
   549
        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
franta-hg@75
   550
        <mkdir dir="${dist.jar.dir}"/>
franta-hg@75
   551
        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
franta-hg@75
   552
            <fileset dir="${build.web.dir}"/>
franta-hg@75
   553
        </jar>
franta-hg@75
   554
    </target>
franta-hg@75
   555
    <target name="-post-dist">
franta-hg@75
   556
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   557
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   558
    </target>
franta-hg@75
   559
    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
franta-hg@75
   560
    <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
   561
    <!--
franta-hg@75
   562
                EXECUTION SECTION
franta-hg@75
   563
            -->
franta-hg@75
   564
    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
franta-hg@75
   565
    <target name="-pre-run-deploy">
franta-hg@75
   566
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   567
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   568
    </target>
franta-hg@75
   569
    <target name="-post-run-deploy">
franta-hg@75
   570
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   571
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   572
    </target>
franta-hg@75
   573
    <target name="-pre-nbmodule-run-deploy">
franta-hg@75
   574
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   575
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
franta-hg@75
   576
    </target>
franta-hg@75
   577
    <target name="-post-nbmodule-run-deploy">
franta-hg@75
   578
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   579
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
franta-hg@75
   580
    </target>
franta-hg@75
   581
    <target name="-run-deploy-am">
franta-hg@75
   582
        <!-- Task to deploy to the Access Manager runtime. -->
franta-hg@75
   583
    </target>
franta-hg@75
   584
    <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
   585
        <nbjpdaappreloaded/>
franta-hg@75
   586
    </target>
franta-hg@75
   587
    <target if="netbeans.home" name="-run-deploy-nb">
franta-hg@75
   588
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
franta-hg@75
   589
    </target>
franta-hg@75
   590
    <target name="-init-deploy-ant" unless="netbeans.home">
franta-hg@75
   591
        <property name="deploy.ant.archive" value="${dist.war}"/>
franta-hg@75
   592
        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
franta-hg@75
   593
        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
franta-hg@75
   594
        <property name="deploy.ant.enabled" value="true"/>
franta-hg@75
   595
    </target>
franta-hg@75
   596
    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
franta-hg@75
   597
    <target if="netbeans.home" name="-run-undeploy-nb">
franta-hg@75
   598
        <fail message="Undeploy is not supported from within the IDE"/>
franta-hg@75
   599
    </target>
franta-hg@75
   600
    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
franta-hg@75
   601
        <nbverify file="${dist.war}"/>
franta-hg@75
   602
    </target>
franta-hg@75
   603
    <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
franta-hg@75
   604
    <target if="do.display.browser" name="-init-display-browser">
franta-hg@75
   605
        <condition property="do.display.browser.nb">
franta-hg@75
   606
            <isset property="netbeans.home"/>
franta-hg@75
   607
        </condition>
franta-hg@75
   608
        <condition property="do.display.browser.cl">
franta-hg@75
   609
            <isset property="deploy.ant.enabled"/>
franta-hg@75
   610
        </condition>
franta-hg@75
   611
    </target>
franta-hg@75
   612
    <target if="do.display.browser.nb" name="-display-browser-nb">
franta-hg@75
   613
        <nbbrowse url="${client.url}"/>
franta-hg@75
   614
    </target>
franta-hg@75
   615
    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
franta-hg@75
   616
        <condition property="browser" value="rundll32">
franta-hg@75
   617
            <os family="windows"/>
franta-hg@75
   618
        </condition>
franta-hg@75
   619
        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
franta-hg@75
   620
            <os family="windows"/>
franta-hg@75
   621
        </condition>
franta-hg@75
   622
        <condition property="browser" value="/usr/bin/open">
franta-hg@75
   623
            <os family="mac"/>
franta-hg@75
   624
        </condition>
franta-hg@75
   625
        <property environment="env"/>
franta-hg@75
   626
        <condition property="browser" value="${env.BROWSER}">
franta-hg@75
   627
            <isset property="env.BROWSER"/>
franta-hg@75
   628
        </condition>
franta-hg@75
   629
        <condition property="browser" value="/usr/bin/firefox">
franta-hg@75
   630
            <available file="/usr/bin/firefox"/>
franta-hg@75
   631
        </condition>
franta-hg@75
   632
        <condition property="browser" value="/usr/local/firefox/firefox">
franta-hg@75
   633
            <available file="/usr/local/firefox/firefox"/>
franta-hg@75
   634
        </condition>
franta-hg@75
   635
        <condition property="browser" value="/usr/bin/mozilla">
franta-hg@75
   636
            <available file="/usr/bin/mozilla"/>
franta-hg@75
   637
        </condition>
franta-hg@75
   638
        <condition property="browser" value="/usr/local/mozilla/mozilla">
franta-hg@75
   639
            <available file="/usr/local/mozilla/mozilla"/>
franta-hg@75
   640
        </condition>
franta-hg@75
   641
        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
franta-hg@75
   642
            <available file="/usr/sfw/lib/firefox/firefox"/>
franta-hg@75
   643
        </condition>
franta-hg@75
   644
        <condition property="browser" value="/opt/csw/bin/firefox">
franta-hg@75
   645
            <available file="/opt/csw/bin/firefox"/>
franta-hg@75
   646
        </condition>
franta-hg@75
   647
        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
franta-hg@75
   648
            <available file="/usr/sfw/lib/mozilla/mozilla"/>
franta-hg@75
   649
        </condition>
franta-hg@75
   650
        <condition property="browser" value="/opt/csw/bin/mozilla">
franta-hg@75
   651
            <available file="/opt/csw/bin/mozilla"/>
franta-hg@75
   652
        </condition>
franta-hg@75
   653
    </target>
franta-hg@75
   654
    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
franta-hg@75
   655
        <fail unless="browser">
franta-hg@75
   656
                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
franta-hg@75
   657
                </fail>
franta-hg@75
   658
        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
franta-hg@75
   659
        <echo>Launching ${browse.url}</echo>
franta-hg@75
   660
        <exec executable="${browser}" spawn="true">
franta-hg@75
   661
            <arg line="${browser.args} ${browse.url}"/>
franta-hg@75
   662
        </exec>
franta-hg@75
   663
    </target>
franta-hg@75
   664
    <target depends="init,-init-cos,compile-single" name="run-main">
franta-hg@75
   665
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
franta-hg@75
   666
        <webproject1:java classname="${run.class}"/>
franta-hg@75
   667
    </target>
franta-hg@75
   668
    <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
franta-hg@75
   669
        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
franta-hg@75
   670
        <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
franta-hg@75
   671
    </target>
franta-hg@75
   672
    <!--
franta-hg@75
   673
                DEBUGGING SECTION
franta-hg@75
   674
            -->
franta-hg@75
   675
    <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
   676
        <nbstartserver debugmode="true"/>
franta-hg@75
   677
        <antcall target="connect-debugger"/>
franta-hg@75
   678
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
franta-hg@75
   679
        <antcall target="debug-display-browser"/>
franta-hg@75
   680
        <antcall target="connect-client-debugger"/>
franta-hg@75
   681
    </target>
franta-hg@75
   682
    <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
franta-hg@75
   683
        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
franta-hg@75
   684
            <classpath>
franta-hg@75
   685
                <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
franta-hg@75
   686
            </classpath>
franta-hg@75
   687
            <sourcepath>
franta-hg@75
   688
                <path path="${web.docbase.dir}"/>
franta-hg@75
   689
            </sourcepath>
franta-hg@75
   690
        </nbjpdaconnect>
franta-hg@75
   691
    </target>
franta-hg@75
   692
    <target if="do.display.browser.debug" name="debug-display-browser">
franta-hg@75
   693
        <nbbrowse url="${client.url}"/>
franta-hg@75
   694
    </target>
franta-hg@75
   695
    <target if="do.debug.client" name="connect-client-debugger">
franta-hg@75
   696
        <webproject1:nbjsdebugstart webUrl="${client.url}"/>
franta-hg@75
   697
    </target>
franta-hg@75
   698
    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
franta-hg@75
   699
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
franta-hg@75
   700
        <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
franta-hg@75
   701
    </target>
franta-hg@75
   702
    <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
   703
    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
franta-hg@75
   704
    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
franta-hg@75
   705
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
franta-hg@75
   706
    </target>
franta-hg@75
   707
    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
franta-hg@75
   708
        <webproject1:nbjpdastart name="${debug.class}"/>
franta-hg@75
   709
    </target>
franta-hg@75
   710
    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
franta-hg@75
   711
        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
franta-hg@75
   712
        <webproject1:debug classname="${debug.class}"/>
franta-hg@75
   713
    </target>
franta-hg@75
   714
    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
franta-hg@75
   715
    <target depends="init" name="-pre-debug-fix">
franta-hg@75
   716
        <fail unless="fix.includes">Must set fix.includes</fail>
franta-hg@75
   717
        <property name="javac.includes" value="${fix.includes}.java"/>
franta-hg@75
   718
    </target>
franta-hg@75
   719
    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
franta-hg@75
   720
        <webproject1:nbjpdareload/>
franta-hg@75
   721
    </target>
franta-hg@75
   722
    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
franta-hg@75
   723
    <!--
franta-hg@75
   724
                JAVADOC SECTION
franta-hg@75
   725
            -->
franta-hg@75
   726
    <target depends="init" name="javadoc-build">
franta-hg@75
   727
        <mkdir dir="${dist.javadoc.dir}"/>
franta-hg@75
   728
        <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
   729
            <classpath>
franta-hg@75
   730
                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
franta-hg@75
   731
            </classpath>
franta-hg@75
   732
            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
franta-hg@75
   733
                <filename name="**/*.java"/>
franta-hg@75
   734
            </fileset>
franta-hg@75
   735
            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
franta-hg@75
   736
                <include name="**/*.java"/>
franta-hg@75
   737
            </fileset>
franta-hg@75
   738
        </javadoc>
franta-hg@75
   739
    </target>
franta-hg@75
   740
    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
franta-hg@75
   741
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
franta-hg@75
   742
    </target>
franta-hg@75
   743
    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
franta-hg@75
   744
    <!--
franta-hg@75
   745
                
franta-hg@75
   746
                JUNIT COMPILATION SECTION
franta-hg@75
   747
            -->
franta-hg@75
   748
    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
franta-hg@75
   749
        <mkdir dir="${build.test.classes.dir}"/>
franta-hg@75
   750
        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
franta-hg@75
   751
    </target>
franta-hg@75
   752
    <target name="-pre-compile-test">
franta-hg@75
   753
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   754
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   755
    </target>
franta-hg@75
   756
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
franta-hg@75
   757
        <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
   758
        <copy todir="${build.test.classes.dir}">
franta-hg@75
   759
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   760
        </copy>
franta-hg@75
   761
    </target>
franta-hg@75
   762
    <target name="-post-compile-test">
franta-hg@75
   763
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   764
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   765
    </target>
franta-hg@75
   766
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
franta-hg@75
   767
    <target name="-pre-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" if="have.tests" name="-do-compile-test-single">
franta-hg@75
   772
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
franta-hg@75
   773
        <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
   774
        <copy todir="${build.test.classes.dir}">
franta-hg@75
   775
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
franta-hg@75
   776
        </copy>
franta-hg@75
   777
    </target>
franta-hg@75
   778
    <target name="-post-compile-test-single">
franta-hg@75
   779
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   780
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   781
    </target>
franta-hg@75
   782
    <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
   783
    <!--
franta-hg@75
   784
                
franta-hg@75
   785
                JUNIT EXECUTION SECTION
franta-hg@75
   786
            -->
franta-hg@75
   787
    <target depends="init" if="have.tests" name="-pre-test-run">
franta-hg@75
   788
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@75
   789
    </target>
franta-hg@75
   790
    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
franta-hg@75
   791
        <webproject2:junit testincludes="**/*Test.java"/>
franta-hg@75
   792
    </target>
franta-hg@75
   793
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
franta-hg@75
   794
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@75
   795
    </target>
franta-hg@75
   796
    <target depends="init" if="have.tests" name="test-report"/>
franta-hg@75
   797
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
franta-hg@75
   798
    <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
   799
    <target depends="init" if="have.tests" name="-pre-test-run-single">
franta-hg@75
   800
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@75
   801
    </target>
franta-hg@75
   802
    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
franta-hg@75
   803
        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
franta-hg@75
   804
        <webproject2:junit excludes="" includes="${test.includes}"/>
franta-hg@75
   805
    </target>
franta-hg@75
   806
    <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
   807
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
franta-hg@75
   808
    </target>
franta-hg@75
   809
    <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
   810
    <!--
franta-hg@75
   811
                
franta-hg@75
   812
                JUNIT DEBUGGING SECTION
franta-hg@75
   813
            -->
franta-hg@75
   814
    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
franta-hg@75
   815
        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
franta-hg@75
   816
        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
franta-hg@75
   817
        <delete file="${test.report.file}"/>
franta-hg@75
   818
        <!-- must exist, otherwise the XML formatter would fail -->
franta-hg@75
   819
        <mkdir dir="${build.test.results.dir}"/>
franta-hg@75
   820
        <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
   821
            <customize>
franta-hg@75
   822
                <arg value="showoutput=true"/>
franta-hg@75
   823
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
franta-hg@75
   824
                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
franta-hg@75
   825
            </customize>
franta-hg@75
   826
        </webproject1:debug>
franta-hg@75
   827
    </target>
franta-hg@75
   828
    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
franta-hg@75
   829
        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
franta-hg@75
   830
    </target>
franta-hg@75
   831
    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
franta-hg@75
   832
    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
franta-hg@75
   833
        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
franta-hg@75
   834
    </target>
franta-hg@75
   835
    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
franta-hg@75
   836
    <!--
franta-hg@75
   837
                
franta-hg@75
   838
                CLEANUP SECTION
franta-hg@75
   839
            -->
franta-hg@77
   840
    <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps">
franta-hg@77
   841
        <ant antfile="${project.nekurak_net-lib}/build.xml" inheritall="false" target="clean"/>
franta-hg@77
   842
    </target>
franta-hg@75
   843
    <target depends="init" name="do-clean">
franta-hg@75
   844
        <condition property="build.dir.to.clean" value="${build.web.dir}">
franta-hg@75
   845
            <isset property="dist.ear.dir"/>
franta-hg@75
   846
        </condition>
franta-hg@75
   847
        <property name="build.dir.to.clean" value="${build.web.dir}"/>
franta-hg@75
   848
        <delete includeEmptyDirs="true" quiet="true">
franta-hg@75
   849
            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
franta-hg@75
   850
        </delete>
franta-hg@75
   851
        <delete dir="${build.dir}"/>
franta-hg@75
   852
        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
franta-hg@75
   853
        <delete dir="${dist.dir}"/>
franta-hg@75
   854
    </target>
franta-hg@75
   855
    <target depends="do-clean" if="status.clean-failed" name="check-clean">
franta-hg@75
   856
        <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
   857
        <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
   858
    </target>
franta-hg@75
   859
    <target depends="init" if="netbeans.home" name="undeploy-clean">
franta-hg@75
   860
        <nbundeploy failOnError="false" startServer="false"/>
franta-hg@75
   861
    </target>
franta-hg@75
   862
    <target name="-post-clean">
franta-hg@75
   863
        <!-- Empty placeholder for easier customization. -->
franta-hg@75
   864
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@75
   865
    </target>
franta-hg@75
   866
    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
franta-hg@75
   867
    <target depends="clean" description="Clean build products." name="clean-ear"/>
franta-hg@75
   868
</project>