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