src-db/build.xml
changeset 0 0247c26f10c6
child 213 7bc683ea98e9
equal deleted inserted replaced
-1:000000000000 0:0247c26f10c6
       
     1 <?xml version="1.0" encoding="UTF-8" ?>
       
     2 <!--
       
     3 ************************************************************************************
       
     4 * Copyright (C) 2001-2006 Openbravo S.L.
       
     5 * Licensed under the Apache Software License version 2.0
       
     6 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
       
     7 * Unless required by applicable law or agreed to  in writing,  software  distributed
       
     8 * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
       
     9 * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
       
    10 * specific language governing permissions and limitations under the License.
       
    11 ************************************************************************************
       
    12 -->
       
    13 <project default="jar" basedir="." name="openbravo-db">
       
    14 
       
    15     <property name="build.db.classes" value="${basedir}/build/classes"/>
       
    16     <property name="build.db.lib" value="${basedir}/build/lib"/>
       
    17     <property name="build.db.docs" value="${basedir}/docs"/>
       
    18     <property name="build.db.src" value="${basedir}/src"/>
       
    19  
       
    20     <path id="db.class.path">
       
    21         <fileset dir="${basedir}/lib">
       
    22             <include name="**/*.jar"/>
       
    23         </fileset>
       
    24         <fileset dir="${basedir}/lib/build-only">
       
    25             <include name="**/*.jar"/>
       
    26         </fileset>
       
    27     </path>   
       
    28     
       
    29     <target name="init">
       
    30         <mkdir dir="${build.db.classes}"/>
       
    31         <mkdir dir="${build.db.lib}"/>
       
    32         <mkdir dir="${build.db.docs}"/>
       
    33     </target>
       
    34 
       
    35     <target name="clean">
       
    36         <delete dir="${build.db.classes}" failonerror="false" includeemptydirs="true"/>
       
    37         <delete dir="${build.db.lib}" failonerror="false" includeemptydirs="true"/>
       
    38         <delete dir="${build.db.docs}" failonerror="false" includeemptydirs="true"/>
       
    39     </target>
       
    40 
       
    41     <target name="compile" depends="clean, init">
       
    42         <javac srcdir="${build.db.src}" destdir="${build.db.classes}" deprecation="on" encoding="UTF-8" debug="${debug.level}">
       
    43             <classpath refid="db.class.path"/>  
       
    44         </javac>
       
    45         <copy todir="${build.db.classes}" >
       
    46             <fileset dir="${build.db.src}" excludes="**/*.java,**/*.form"/>
       
    47         </copy>
       
    48     </target>
       
    49 
       
    50     <target name="build.jar">
       
    51         <jar destfile="${build.db.lib}/dbmanager.jar">
       
    52             <fileset dir="${build.db.classes}"/>
       
    53             <manifest>
       
    54                 <attribute name="Built-By" value="Openbravo S.L."/>
       
    55             </manifest>
       
    56         </jar> 
       
    57     </target>
       
    58 
       
    59 
       
    60     <target name="doc" depends="init" description="Generate api">
       
    61         <javadoc packagenames="org.openbravo.*" 
       
    62             sourcepath="${build.db.src}"
       
    63             destdir="${build.db.docs}"
       
    64             author="true"
       
    65             version="true"
       
    66             use="true"
       
    67             docencoding="UTF-8"
       
    68             encoding="UTF-8"
       
    69             failonerror="false"
       
    70             windowtitle="${ant.project.name}">
       
    71             <classpath refid="db.class.path"/>
       
    72         </javadoc>
       
    73     </target>
       
    74 
       
    75     <target name="jar" depends="compile, build.jar">
       
    76     </target>
       
    77 
       
    78     <target name="build" depends="jar, doc">
       
    79     </target>
       
    80 
       
    81 </project>