samples/livedb/nbproject/build-impl.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Thu, 15 Jul 2010 00:40:37 +0200
branchlivedb
changeset 358 afdd66815ee3
parent 355 d1e7424dc988
child 413 f11943a373a7
permissions -rw-r--r--
If the JavaDB is on, we can compile and successfully execute the tests
     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 
     9   - initialization
    10   - compilation
    11   - jar
    12   - execution
    13   - debugging
    14   - javadoc
    15   - junit compilation
    16   - junit execution
    17   - junit debugging
    18   - applet
    19   - cleanup
    20 
    21         -->
    22 <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="livedb-impl">
    23     <fail message="Please build using Ant 1.7.1 or higher.">
    24         <condition>
    25             <not>
    26                 <antversion atleast="1.7.1"/>
    27             </not>
    28         </condition>
    29     </fail>
    30     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    31     <!-- 
    32                 ======================
    33                 INITIALIZATION SECTION 
    34                 ======================
    35             -->
    36     <target name="-pre-init">
    37         <!-- Empty placeholder for easier customization. -->
    38         <!-- You can override this target in the ../build.xml file. -->
    39     </target>
    40     <target depends="-pre-init" name="-init-private">
    41         <property file="nbproject/private/config.properties"/>
    42         <property file="nbproject/private/configs/${config}.properties"/>
    43         <property file="nbproject/private/private.properties"/>
    44     </target>
    45     <target depends="-pre-init,-init-private" name="-init-user">
    46         <property file="${user.properties.file}"/>
    47         <!-- The two properties below are usually overridden -->
    48         <!-- by the active platform. Just a fallback. -->
    49         <property name="default.javac.source" value="1.4"/>
    50         <property name="default.javac.target" value="1.4"/>
    51     </target>
    52     <target depends="-pre-init,-init-private,-init-user" name="-init-project">
    53         <property file="nbproject/configs/${config}.properties"/>
    54         <property file="nbproject/project.properties"/>
    55     </target>
    56     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    57         <available file="${manifest.file}" property="manifest.available"/>
    58         <condition property="splashscreen.available">
    59             <and>
    60                 <not>
    61                     <equals arg1="${application.splash}" arg2="" trim="true"/>
    62                 </not>
    63                 <available file="${application.splash}"/>
    64             </and>
    65         </condition>
    66         <condition property="main.class.available">
    67             <and>
    68                 <isset property="main.class"/>
    69                 <not>
    70                     <equals arg1="${main.class}" arg2="" trim="true"/>
    71                 </not>
    72             </and>
    73         </condition>
    74         <condition property="manifest.available+main.class">
    75             <and>
    76                 <isset property="manifest.available"/>
    77                 <isset property="main.class.available"/>
    78             </and>
    79         </condition>
    80         <condition property="do.mkdist">
    81             <and>
    82                 <isset property="libs.CopyLibs.classpath"/>
    83                 <not>
    84                     <istrue value="${mkdist.disabled}"/>
    85                 </not>
    86             </and>
    87         </condition>
    88         <condition property="manifest.available+main.class+mkdist.available">
    89             <and>
    90                 <istrue value="${manifest.available+main.class}"/>
    91                 <isset property="do.mkdist"/>
    92             </and>
    93         </condition>
    94         <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
    95             <and>
    96                 <istrue value="${manifest.available+main.class+mkdist.available}"/>
    97                 <istrue value="${splashscreen.available}"/>
    98             </and>
    99         </condition>
   100         <condition property="do.archive">
   101             <not>
   102                 <istrue value="${jar.archive.disabled}"/>
   103             </not>
   104         </condition>
   105         <condition property="do.archive+manifest.available">
   106             <and>
   107                 <isset property="manifest.available"/>
   108                 <istrue value="${do.archive}"/>
   109             </and>
   110         </condition>
   111         <condition property="do.archive+manifest.available+main.class">
   112             <and>
   113                 <istrue value="${manifest.available+main.class}"/>
   114                 <istrue value="${do.archive}"/>
   115             </and>
   116         </condition>
   117         <condition property="do.archive+manifest.available+main.class+mkdist.available">
   118             <and>
   119                 <istrue value="${manifest.available+main.class+mkdist.available}"/>
   120                 <istrue value="${do.archive}"/>
   121             </and>
   122         </condition>
   123         <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
   124             <and>
   125                 <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
   126                 <istrue value="${do.archive}"/>
   127             </and>
   128         </condition>
   129         <condition property="have.tests">
   130             <or>
   131                 <available file="${test.src.dir}"/>
   132             </or>
   133         </condition>
   134         <condition property="have.sources">
   135             <or>
   136                 <available file="${src.dir}"/>
   137             </or>
   138         </condition>
   139         <condition property="netbeans.home+have.tests">
   140             <and>
   141                 <isset property="netbeans.home"/>
   142                 <isset property="have.tests"/>
   143             </and>
   144         </condition>
   145         <condition property="no.javadoc.preview">
   146             <and>
   147                 <isset property="javadoc.preview"/>
   148                 <isfalse value="${javadoc.preview}"/>
   149             </and>
   150         </condition>
   151         <property name="run.jvmargs" value=""/>
   152         <property name="javac.compilerargs" value=""/>
   153         <property name="work.dir" value="${basedir}"/>
   154         <condition property="no.deps">
   155             <and>
   156                 <istrue value="${no.dependencies}"/>
   157             </and>
   158         </condition>
   159         <property name="javac.debug" value="true"/>
   160         <property name="javadoc.preview" value="true"/>
   161         <property name="application.args" value=""/>
   162         <property name="source.encoding" value="${file.encoding}"/>
   163         <property name="runtime.encoding" value="${source.encoding}"/>
   164         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   165             <and>
   166                 <isset property="javadoc.encoding"/>
   167                 <not>
   168                     <equals arg1="${javadoc.encoding}" arg2=""/>
   169                 </not>
   170             </and>
   171         </condition>
   172         <property name="javadoc.encoding.used" value="${source.encoding}"/>
   173         <property name="includes" value="**"/>
   174         <property name="excludes" value=""/>
   175         <property name="do.depend" value="false"/>
   176         <condition property="do.depend.true">
   177             <istrue value="${do.depend}"/>
   178         </condition>
   179         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   180         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   181             <length length="0" string="${endorsed.classpath}" when="greater"/>
   182         </condition>
   183         <property name="javac.fork" value="false"/>
   184         <property name="jar.index" value="false"/>
   185         <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   186     </target>
   187     <target name="-post-init">
   188         <!-- Empty placeholder for easier customization. -->
   189         <!-- You can override this target in the ../build.xml file. -->
   190     </target>
   191     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
   192         <fail unless="src.dir">Must set src.dir</fail>
   193         <fail unless="test.src.dir">Must set test.src.dir</fail>
   194         <fail unless="build.dir">Must set build.dir</fail>
   195         <fail unless="dist.dir">Must set dist.dir</fail>
   196         <fail unless="build.classes.dir">Must set build.classes.dir</fail>
   197         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
   198         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
   199         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
   200         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   201         <fail unless="dist.jar">Must set dist.jar</fail>
   202     </target>
   203     <target name="-init-macrodef-property">
   204         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
   205             <attribute name="name"/>
   206             <attribute name="value"/>
   207             <sequential>
   208                 <property name="@{name}" value="${@{value}}"/>
   209             </sequential>
   210         </macrodef>
   211     </target>
   212     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
   213         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   214             <attribute default="${src.dir}" name="srcdir"/>
   215             <attribute default="${build.classes.dir}" name="destdir"/>
   216             <attribute default="${javac.classpath}" name="classpath"/>
   217             <attribute default="${javac.processorpath}" name="processorpath"/>
   218             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   219             <attribute default="${includes}" name="includes"/>
   220             <attribute default="${excludes}" name="excludes"/>
   221             <attribute default="${javac.debug}" name="debug"/>
   222             <attribute default="${empty.dir}" name="sourcepath"/>
   223             <attribute default="${empty.dir}" name="gensrcdir"/>
   224             <element name="customize" optional="true"/>
   225             <sequential>
   226                 <property location="${build.dir}/empty" name="empty.dir"/>
   227                 <mkdir dir="${empty.dir}"/>
   228                 <mkdir dir="@{apgeneratedsrcdir}"/>
   229                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
   230                     <src>
   231                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   232                             <include name="*"/>
   233                         </dirset>
   234                     </src>
   235                     <classpath>
   236                         <path path="@{classpath}"/>
   237                     </classpath>
   238                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   239                     <compilerarg line="${javac.compilerargs}"/>
   240                     <compilerarg value="-processorpath"/>
   241                     <compilerarg path="@{processorpath}:${empty.dir}"/>
   242                     <compilerarg line="${ap.processors.internal}"/>
   243                     <compilerarg line="${annotation.processing.processor.options}"/>
   244                     <compilerarg value="-s"/>
   245                     <compilerarg path="@{apgeneratedsrcdir}"/>
   246                     <compilerarg line="${ap.proc.none.internal}"/>
   247                     <customize/>
   248                 </javac>
   249             </sequential>
   250         </macrodef>
   251     </target>
   252     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   253         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   254             <attribute default="${src.dir}" name="srcdir"/>
   255             <attribute default="${build.classes.dir}" name="destdir"/>
   256             <attribute default="${javac.classpath}" name="classpath"/>
   257             <attribute default="${javac.processorpath}" name="processorpath"/>
   258             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   259             <attribute default="${includes}" name="includes"/>
   260             <attribute default="${excludes}" name="excludes"/>
   261             <attribute default="${javac.debug}" name="debug"/>
   262             <attribute default="${empty.dir}" name="sourcepath"/>
   263             <attribute default="${empty.dir}" name="gensrcdir"/>
   264             <element name="customize" optional="true"/>
   265             <sequential>
   266                 <property location="${build.dir}/empty" name="empty.dir"/>
   267                 <mkdir dir="${empty.dir}"/>
   268                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
   269                     <src>
   270                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   271                             <include name="*"/>
   272                         </dirset>
   273                     </src>
   274                     <classpath>
   275                         <path path="@{classpath}"/>
   276                     </classpath>
   277                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   278                     <compilerarg line="${javac.compilerargs}"/>
   279                     <customize/>
   280                 </javac>
   281             </sequential>
   282         </macrodef>
   283     </target>
   284     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   285         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   286             <attribute default="${src.dir}" name="srcdir"/>
   287             <attribute default="${build.classes.dir}" name="destdir"/>
   288             <attribute default="${javac.classpath}" name="classpath"/>
   289             <sequential>
   290                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
   291                     <classpath>
   292                         <path path="@{classpath}"/>
   293                     </classpath>
   294                 </depend>
   295             </sequential>
   296         </macrodef>
   297         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
   298             <attribute default="${build.classes.dir}" name="destdir"/>
   299             <sequential>
   300                 <fail unless="javac.includes">Must set javac.includes</fail>
   301                 <pathconvert pathsep="," property="javac.includes.binary">
   302                     <path>
   303                         <filelist dir="@{destdir}" files="${javac.includes}"/>
   304                     </path>
   305                     <globmapper from="*.java" to="*.class"/>
   306                 </pathconvert>
   307                 <delete>
   308                     <files includes="${javac.includes.binary}"/>
   309                 </delete>
   310             </sequential>
   311         </macrodef>
   312     </target>
   313     <target name="-init-macrodef-junit">
   314         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   315             <attribute default="${includes}" name="includes"/>
   316             <attribute default="${excludes}" name="excludes"/>
   317             <attribute default="**" name="testincludes"/>
   318             <sequential>
   319                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
   320                     <batchtest todir="${build.test.results.dir}">
   321                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   322                             <filename name="@{testincludes}"/>
   323                         </fileset>
   324                     </batchtest>
   325                     <classpath>
   326                         <path path="${run.test.classpath}"/>
   327                     </classpath>
   328                     <syspropertyset>
   329                         <propertyref prefix="test-sys-prop."/>
   330                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   331                     </syspropertyset>
   332                     <formatter type="brief" usefile="false"/>
   333                     <formatter type="xml"/>
   334                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   335                     <jvmarg line="${run.jvmargs}"/>
   336                 </junit>
   337             </sequential>
   338         </macrodef>
   339     </target>
   340     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   341         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   342             <attribute default="${main.class}" name="name"/>
   343             <attribute default="${debug.classpath}" name="classpath"/>
   344             <attribute default="" name="stopclassname"/>
   345             <sequential>
   346                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
   347                     <classpath>
   348                         <path path="@{classpath}"/>
   349                     </classpath>
   350                 </nbjpdastart>
   351             </sequential>
   352         </macrodef>
   353         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
   354             <attribute default="${build.classes.dir}" name="dir"/>
   355             <sequential>
   356                 <nbjpdareload>
   357                     <fileset dir="@{dir}" includes="${fix.classes}">
   358                         <include name="${fix.includes}*.class"/>
   359                     </fileset>
   360                 </nbjpdareload>
   361             </sequential>
   362         </macrodef>
   363     </target>
   364     <target name="-init-debug-args">
   365         <property name="version-output" value="java version &quot;${ant.java.version}"/>
   366         <condition property="have-jdk-older-than-1.4">
   367             <or>
   368                 <contains string="${version-output}" substring="java version &quot;1.0"/>
   369                 <contains string="${version-output}" substring="java version &quot;1.1"/>
   370                 <contains string="${version-output}" substring="java version &quot;1.2"/>
   371                 <contains string="${version-output}" substring="java version &quot;1.3"/>
   372             </or>
   373         </condition>
   374         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   375             <istrue value="${have-jdk-older-than-1.4}"/>
   376         </condition>
   377         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   378             <os family="windows"/>
   379         </condition>
   380         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
   381             <isset property="debug.transport"/>
   382         </condition>
   383     </target>
   384     <target depends="-init-debug-args" name="-init-macrodef-debug">
   385         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   386             <attribute default="${main.class}" name="classname"/>
   387             <attribute default="${debug.classpath}" name="classpath"/>
   388             <element name="customize" optional="true"/>
   389             <sequential>
   390                 <java classname="@{classname}" dir="${work.dir}" fork="true">
   391                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   392                     <jvmarg line="${debug-args-line}"/>
   393                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   394                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   395                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   396                     <jvmarg line="${run.jvmargs}"/>
   397                     <classpath>
   398                         <path path="@{classpath}"/>
   399                     </classpath>
   400                     <syspropertyset>
   401                         <propertyref prefix="run-sys-prop."/>
   402                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   403                     </syspropertyset>
   404                     <customize/>
   405                 </java>
   406             </sequential>
   407         </macrodef>
   408     </target>
   409     <target name="-init-macrodef-java">
   410         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   411             <attribute default="${main.class}" name="classname"/>
   412             <attribute default="${run.classpath}" name="classpath"/>
   413             <element name="customize" optional="true"/>
   414             <sequential>
   415                 <java classname="@{classname}" dir="${work.dir}" fork="true">
   416                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   417                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   418                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   419                     <jvmarg line="${run.jvmargs}"/>
   420                     <classpath>
   421                         <path path="@{classpath}"/>
   422                     </classpath>
   423                     <syspropertyset>
   424                         <propertyref prefix="run-sys-prop."/>
   425                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   426                     </syspropertyset>
   427                     <customize/>
   428                 </java>
   429             </sequential>
   430         </macrodef>
   431     </target>
   432     <target name="-init-macrodef-copylibs">
   433         <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   434             <element name="customize" optional="true"/>
   435             <sequential>
   436                 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   437                 <pathconvert property="run.classpath.without.build.classes.dir">
   438                     <path path="${run.classpath}"/>
   439                     <map from="${build.classes.dir.resolved}" to=""/>
   440                 </pathconvert>
   441                 <pathconvert pathsep=" " property="jar.classpath">
   442                     <path path="${run.classpath.without.build.classes.dir}"/>
   443                     <chainedmapper>
   444                         <flattenmapper/>
   445                         <globmapper from="*" to="lib/*"/>
   446                     </chainedmapper>
   447                 </pathconvert>
   448                 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   449                 <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   450                     <fileset dir="${build.classes.dir}"/>
   451                     <manifest>
   452                         <attribute name="Class-Path" value="${jar.classpath}"/>
   453                         <customize/>
   454                     </manifest>
   455                 </copylibs>
   456             </sequential>
   457         </macrodef>
   458     </target>
   459     <target name="-init-presetdef-jar">
   460         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   461             <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
   462                 <j2seproject1:fileset dir="${build.classes.dir}"/>
   463             </jar>
   464         </presetdef>
   465     </target>
   466     <target name="-init-ap-cmdline-properties">
   467         <property name="annotation.processing.enabled" value="true"/>
   468         <property name="annotation.processing.processors.list" value=""/>
   469         <property name="annotation.processing.processor.options" value=""/>
   470         <property name="annotation.processing.run.all.processors" value="true"/>
   471         <property name="javac.processorpath" value="${javac.classpath}"/>
   472         <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
   473         <condition property="ap.supported.internal" value="true">
   474             <not>
   475                 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
   476             </not>
   477         </condition>
   478     </target>
   479     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
   480         <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
   481             <isfalse value="${annotation.processing.run.all.processors}"/>
   482         </condition>
   483         <condition else="" property="ap.proc.none.internal" value="-proc:none">
   484             <isfalse value="${annotation.processing.enabled}"/>
   485         </condition>
   486     </target>
   487     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   488         <property name="ap.cmd.line.internal" value=""/>
   489     </target>
   490     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
   491     <!--
   492                 ===================
   493                 COMPILATION SECTION
   494                 ===================
   495             -->
   496     <target name="-deps-jar-init" unless="built-jar.properties">
   497         <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
   498         <delete file="${built-jar.properties}" quiet="true"/>
   499     </target>
   500     <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
   501         <echo level="warn" message="Cycle detected: livedb was already built"/>
   502     </target>
   503     <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
   504         <mkdir dir="${build.dir}"/>
   505         <touch file="${built-jar.properties}" verbose="false"/>
   506         <property file="${built-jar.properties}" prefix="already.built.jar."/>
   507         <antcall target="-warn-already-built-jar"/>
   508         <propertyfile file="${built-jar.properties}">
   509             <entry key="${basedir}" value=""/>
   510         </propertyfile>
   511     </target>
   512     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
   513     <target depends="init" name="-check-automatic-build">
   514         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   515     </target>
   516     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
   517         <antcall target="clean"/>
   518     </target>
   519     <target depends="init,deps-jar" name="-pre-pre-compile">
   520         <mkdir dir="${build.classes.dir}"/>
   521     </target>
   522     <target name="-pre-compile">
   523         <!-- Empty placeholder for easier customization. -->
   524         <!-- You can override this target in the ../build.xml file. -->
   525     </target>
   526     <target if="do.depend.true" name="-compile-depend">
   527         <pathconvert property="build.generated.subdirs">
   528             <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   529                 <include name="*"/>
   530             </dirset>
   531         </pathconvert>
   532         <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   533     </target>
   534     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
   535         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   536         <copy todir="${build.classes.dir}">
   537             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   538         </copy>
   539     </target>
   540     <target if="has.persistence.xml" name="-copy-persistence-xml">
   541         <mkdir dir="${build.classes.dir}/META-INF"/>
   542         <copy todir="${build.classes.dir}/META-INF">
   543             <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
   544         </copy>
   545     </target>
   546     <target name="-post-compile">
   547         <!-- Empty placeholder for easier customization. -->
   548         <!-- You can override this target in the ../build.xml file. -->
   549     </target>
   550     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   551     <target name="-pre-compile-single">
   552         <!-- Empty placeholder for easier customization. -->
   553         <!-- You can override this target in the ../build.xml file. -->
   554     </target>
   555     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   556         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   557         <j2seproject3:force-recompile/>
   558         <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   559     </target>
   560     <target name="-post-compile-single">
   561         <!-- Empty placeholder for easier customization. -->
   562         <!-- You can override this target in the ../build.xml file. -->
   563     </target>
   564     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   565     <!--
   566                 ====================
   567                 JAR BUILDING SECTION
   568                 ====================
   569             -->
   570     <target depends="init" name="-pre-pre-jar">
   571         <dirname file="${dist.jar}" property="dist.jar.dir"/>
   572         <mkdir dir="${dist.jar.dir}"/>
   573     </target>
   574     <target name="-pre-jar">
   575         <!-- Empty placeholder for easier customization. -->
   576         <!-- You can override this target in the ../build.xml file. -->
   577     </target>
   578     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
   579         <j2seproject1:jar/>
   580     </target>
   581     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   582         <j2seproject1:jar manifest="${manifest.file}"/>
   583     </target>
   584     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   585         <j2seproject1:jar manifest="${manifest.file}">
   586             <j2seproject1:manifest>
   587                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   588             </j2seproject1:manifest>
   589         </j2seproject1:jar>
   590         <echo>To run this application from the command line without Ant, try:</echo>
   591         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   592         <property location="${dist.jar}" name="dist.jar.resolved"/>
   593         <pathconvert property="run.classpath.with.dist.jar">
   594             <path path="${run.classpath}"/>
   595             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   596         </pathconvert>
   597         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   598     </target>
   599     <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
   600         <basename file="${application.splash}" property="splashscreen.basename"/>
   601         <mkdir dir="${build.classes.dir}/META-INF"/>
   602         <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   603         <j2seproject3:copylibs>
   604             <customize>
   605                 <attribute name="Main-Class" value="${main.class}"/>
   606                 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   607             </customize>
   608         </j2seproject3:copylibs>
   609         <echo>To run this application from the command line without Ant, try:</echo>
   610         <property location="${dist.jar}" name="dist.jar.resolved"/>
   611         <echo>java -jar "${dist.jar.resolved}"</echo>
   612     </target>
   613     <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
   614         <j2seproject3:copylibs>
   615             <customize>
   616                 <attribute name="Main-Class" value="${main.class}"/>
   617             </customize>
   618         </j2seproject3:copylibs>
   619         <echo>To run this application from the command line without Ant, try:</echo>
   620         <property location="${dist.jar}" name="dist.jar.resolved"/>
   621         <echo>java -jar "${dist.jar.resolved}"</echo>
   622     </target>
   623     <target name="-post-jar">
   624         <!-- Empty placeholder for easier customization. -->
   625         <!-- You can override this target in the ../build.xml file. -->
   626     </target>
   627     <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
   628     <!--
   629                 =================
   630                 EXECUTION SECTION
   631                 =================
   632             -->
   633     <target depends="init,compile" description="Run a main class." name="run">
   634         <j2seproject1:java>
   635             <customize>
   636                 <arg line="${application.args}"/>
   637             </customize>
   638         </j2seproject1:java>
   639     </target>
   640     <target name="-do-not-recompile">
   641         <property name="javac.includes.binary" value=""/>
   642     </target>
   643     <target depends="init,compile-single" name="run-single">
   644         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   645         <j2seproject1:java classname="${run.class}"/>
   646     </target>
   647     <target depends="init,compile-test-single" name="run-test-with-main">
   648         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   649         <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   650     </target>
   651     <!--
   652                 =================
   653                 DEBUGGING SECTION
   654                 =================
   655             -->
   656     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   657         <j2seproject1:nbjpdastart name="${debug.class}"/>
   658     </target>
   659     <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
   660         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
   661     </target>
   662     <target depends="init,compile" name="-debug-start-debuggee">
   663         <j2seproject3:debug>
   664             <customize>
   665                 <arg line="${application.args}"/>
   666             </customize>
   667         </j2seproject3:debug>
   668     </target>
   669     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
   670     <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
   671         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
   672     </target>
   673     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
   674     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
   675         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   676         <j2seproject3:debug classname="${debug.class}"/>
   677     </target>
   678     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   679     <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   680         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   681         <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   682     </target>
   683     <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   684     <target depends="init" name="-pre-debug-fix">
   685         <fail unless="fix.includes">Must set fix.includes</fail>
   686         <property name="javac.includes" value="${fix.includes}.java"/>
   687     </target>
   688     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
   689         <j2seproject1:nbjpdareload/>
   690     </target>
   691     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   692     <!--
   693                 ===============
   694                 JAVADOC SECTION
   695                 ===============
   696             -->
   697     <target depends="init" if="have.sources" name="-javadoc-build">
   698         <mkdir dir="${dist.javadoc.dir}"/>
   699         <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}">
   700             <classpath>
   701                 <path path="${javac.classpath}"/>
   702             </classpath>
   703             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   704                 <filename name="**/*.java"/>
   705             </fileset>
   706             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   707                 <include name="**/*.java"/>
   708             </fileset>
   709         </javadoc>
   710         <copy todir="${dist.javadoc.dir}">
   711             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   712                 <filename name="**/doc-files/**"/>
   713             </fileset>
   714             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   715                 <include name="**/doc-files/**"/>
   716             </fileset>
   717         </copy>
   718     </target>
   719     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
   720         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
   721     </target>
   722     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
   723     <!--
   724                 =========================
   725                 JUNIT COMPILATION SECTION
   726                 =========================
   727             -->
   728     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
   729         <mkdir dir="${build.test.classes.dir}"/>
   730     </target>
   731     <target name="-pre-compile-test">
   732         <!-- Empty placeholder for easier customization. -->
   733         <!-- You can override this target in the ../build.xml file. -->
   734     </target>
   735     <target if="do.depend.true" name="-compile-test-depend">
   736         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   737     </target>
   738     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   739         <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
   740         <copy todir="${build.test.classes.dir}">
   741             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   742         </copy>
   743     </target>
   744     <target name="-post-compile-test">
   745         <!-- Empty placeholder for easier customization. -->
   746         <!-- You can override this target in the ../build.xml file. -->
   747     </target>
   748     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
   749     <target name="-pre-compile-test-single">
   750         <!-- Empty placeholder for easier customization. -->
   751         <!-- You can override this target in the ../build.xml file. -->
   752     </target>
   753     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   754         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   755         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   756         <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
   757         <copy todir="${build.test.classes.dir}">
   758             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   759         </copy>
   760     </target>
   761     <target name="-post-compile-test-single">
   762         <!-- Empty placeholder for easier customization. -->
   763         <!-- You can override this target in the ../build.xml file. -->
   764     </target>
   765     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
   766     <!--
   767                 =======================
   768                 JUNIT EXECUTION SECTION
   769                 =======================
   770             -->
   771     <target depends="init" if="have.tests" name="-pre-test-run">
   772         <mkdir dir="${build.test.results.dir}"/>
   773     </target>
   774     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
   775         <j2seproject3:junit testincludes="**/*Test.java"/>
   776     </target>
   777     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
   778         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   779     </target>
   780     <target depends="init" if="have.tests" name="test-report"/>
   781     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
   782     <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
   783     <target depends="init" if="have.tests" name="-pre-test-run-single">
   784         <mkdir dir="${build.test.results.dir}"/>
   785     </target>
   786     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
   787         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
   788         <j2seproject3:junit excludes="" includes="${test.includes}"/>
   789     </target>
   790     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
   791         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   792     </target>
   793     <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"/>
   794     <!--
   795                 =======================
   796                 JUNIT DEBUGGING SECTION
   797                 =======================
   798             -->
   799     <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
   800         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
   801         <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
   802         <delete file="${test.report.file}"/>
   803         <mkdir dir="${build.test.results.dir}"/>
   804         <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
   805             <customize>
   806                 <syspropertyset>
   807                     <propertyref prefix="test-sys-prop."/>
   808                     <mapper from="test-sys-prop.*" to="*" type="glob"/>
   809                 </syspropertyset>
   810                 <arg value="${test.class}"/>
   811                 <arg value="showoutput=true"/>
   812                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
   813                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
   814             </customize>
   815         </j2seproject3:debug>
   816     </target>
   817     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
   818         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
   819     </target>
   820     <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   821     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
   822         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
   823     </target>
   824     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
   825     <!--
   826                 =========================
   827                 APPLET EXECUTION SECTION
   828                 =========================
   829             -->
   830     <target depends="init,compile-single" name="run-applet">
   831         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   832         <j2seproject1:java classname="sun.applet.AppletViewer">
   833             <customize>
   834                 <arg value="${applet.url}"/>
   835             </customize>
   836         </j2seproject1:java>
   837     </target>
   838     <!--
   839                 =========================
   840                 APPLET DEBUGGING  SECTION
   841                 =========================
   842             -->
   843     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
   844         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   845         <j2seproject3:debug classname="sun.applet.AppletViewer">
   846             <customize>
   847                 <arg value="${applet.url}"/>
   848             </customize>
   849         </j2seproject3:debug>
   850     </target>
   851     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
   852     <!--
   853                 ===============
   854                 CLEANUP SECTION
   855                 ===============
   856             -->
   857     <target name="-deps-clean-init" unless="built-clean.properties">
   858         <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
   859         <delete file="${built-clean.properties}" quiet="true"/>
   860     </target>
   861     <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
   862         <echo level="warn" message="Cycle detected: livedb was already built"/>
   863     </target>
   864     <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
   865         <mkdir dir="${build.dir}"/>
   866         <touch file="${built-clean.properties}" verbose="false"/>
   867         <property file="${built-clean.properties}" prefix="already.built.clean."/>
   868         <antcall target="-warn-already-built-clean"/>
   869         <propertyfile file="${built-clean.properties}">
   870             <entry key="${basedir}" value=""/>
   871         </propertyfile>
   872     </target>
   873     <target depends="init" name="-do-clean">
   874         <delete dir="${build.dir}"/>
   875         <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
   876     </target>
   877     <target name="-post-clean">
   878         <!-- Empty placeholder for easier customization. -->
   879         <!-- You can override this target in the ../build.xml file. -->
   880     </target>
   881     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
   882     <target name="-check-call-dep">
   883         <property file="${call.built.properties}" prefix="already.built."/>
   884         <condition property="should.call.dep">
   885             <not>
   886                 <isset property="already.built.${call.subproject}"/>
   887             </not>
   888         </condition>
   889     </target>
   890     <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
   891         <ant antfile="${call.script}" inheritall="false" target="${call.target}">
   892             <propertyset>
   893                 <propertyref prefix="transfer."/>
   894                 <mapper from="transfer.*" to="*" type="glob"/>
   895             </propertyset>
   896         </ant>
   897     </target>
   898 </project>