Show
Ignore:
Timestamp:
05/17/01 13:38:44 (11 years ago)
Author:
team4
Message:

*** empty log message ***

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/refactoring_1/Rapla/build.xml

    r29 r34  
    33       <!-- set global properties for this build --> 
    44       <property name="src" value="src" /> 
    5        <property name="build" value="classes" /> 
    6        <property name="run" value="org.rapla.gui.Start" /> 
    7        <property name="db_driver" value="lib/mm.mysql-2.0.2-bin.jar"/> 
    8        <property name="xml_parser_lib1" value="lib/crimson.jar"/> 
    9        <property name="xml_parser_lib2" value="lib/jaxp.jar"/> 
    10        <property name="rapla.home" /> 
    11        <property name="config_path" value="rapla.properties" /> 
     5       <property name="build" value="build" /> 
     6       <property name="dist" value="dist" /> 
     7       <path id="classpath"> 
     8           <fileset dir="./lib"> 
     9               <include name="*.jar"/> 
     10           </fileset> 
     11       </path> 
     12 
    1213       <target name="prepare">  
    1314         <!-- Create the time stamp --> 
     
    1516         <!-- Create the build directory structure used by compile --> 
    1617         <mkdir dir="${build}" /> 
     18         <mkdir dir="${build}/classes" /> 
    1719       </target> 
    1820        
    19        <target name="build_db" depends="prepare"> 
    20          <!-- Put everything in ${build_db} into the db.jar file --> 
    21          <jar jarfile="lib/db.jar" basedir="${build_db}" /> 
    22        </target> 
    23  
    24  
    2521       <target name="compile" depends="prepare"> 
    2622         <!-- Compile the java code from ${src} into ${build} --> 
    27  
    28          <javac srcdir="${src}" destdir="${build}" verbose="no"> 
    29          <classpath> 
    30             <!--pathelement path="lib/db.jar" /--> 
    31          </classpath>  
     23         <javac srcdir="${src}" destdir="${build}/classes" verbose="no"> 
     24             <classpath refid="classpath"> 
     25             </classpath>  
    3226         </javac> 
    3327       </target> 
     
    3529       <target name="build" depends="compile"> 
    3630         <!-- Copy the gifs into ${build} --> 
    37          <copy todir="${build}" > 
     31         <copy todir="${build}/classes" > 
    3832             <fileset dir="${src}" > 
    3933                <include name="**/*.gif" /> 
     
    4135         </copy>  
    4236         <!-- Put everything in ${build} into the Rapla.jar file --> 
    43          <jar jarfile="lib/Rapla.jar" basedir="${build}" /> 
    44        </target> 
    45  
    46        <target name="run" depends="build"> 
    47               <antcall target="run_with_config"/> 
    48               <!-- antcall target="run_without_config" /--> 
    49        </target> 
    50         
    51        <target name="run_with_config" if="config_path"> 
    52          <echo message="Using Class : ${run}"/> 
    53          <echo message="With Config: ${config_path}"/> 
    54          <java classname="${run}" fork="yes">  
    55            <!--jvmarg value="-Dorg.xml.sax.driver=org.apache.crimson.parsers.Parser2"/-->  
    56            <!--jvmarg value="-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser"/-->  
    57            <classpath> 
    58              <pathelement path="classes" /> 
    59              <pathelement path="${db_driver}" /> 
    60              <pathelement path="${xml_parser_lib1}" /> 
    61              <pathelement path="${xml_parser_lib2}" /> 
    62            </classpath>  
    63            <arg value="${config_path}"/> 
    64          </java> 
    65        </target> 
    66  
    67        <target name="run_without_config" unless="config_path"> 
    68          <echo message="Using Class : ${run}"/> 
    69          <echo message="Without Config"/> 
    70          <java classname="${run}" fork="yes">  
    71             <classpath> 
    72                <pathelement path="classes" /> 
    73                <pathelement path="${db_driver}" /> 
    74                <pathelement path="${xml_parser_lib1}" /> 
    75                <pathelement path="${xml_parser_lib2}" /> 
    76             </classpath>  
    77          </java> 
     37         <jar jarfile="${build}/rapla.jar" basedir="${build}/classes" /> 
    7838       </target> 
    7939 
    8040       <target name="dist" depends="build"> 
     41         <mkdir dir="${dist}" /> 
     42         <mkdir dir="${dist}/lib" /> 
     43         <copy todir="${dist}/lib" > 
     44             <fileset dir="lib" > 
     45                <include name="crimson.jar" /> 
     46                <include name="jaxp.jar" /> 
     47                <include name="mm.mysql-2.0.2-bin.jar" /> 
     48             </fileset> 
     49             <fileset dir="build" > 
     50                <include name="rapla.jar" /> 
     51             </fileset> 
     52         </copy>  
     53         <mkdir dir="${dist}/html" /> 
     54         <copy todir="${dist}" > 
     55             <fileset dir="html" > 
     56                <include name="**" /> 
     57             </fileset> 
     58         </copy> 
     59         <copy todir="${dist}" > 
     60             <fileset dir="." > 
     61                <include name="README" /> 
     62                <include name="INSTALL" /> 
     63                <include name="dummydb.sql" /> 
     64                <include name="rapladb.sql" /> 
     65                <include name="rapla.properties" /> 
     66                <include name="data.xml" /> 
     67                <include name="start.sh" /> 
     68                <include name="start.bat" /> 
     69             </fileset> 
     70         </copy> 
     71         <chmod perm="ugo+rx"> 
     72            <fileset dir="${dist}"> 
     73               <include name="start.*"/> 
     74            </fileset> 
     75         </chmod> 
    8176       </target> 
    8277 
    8378       <target name="clean"> 
    84          <!-- Delete the ${build} and ${dist} directory trees --> 
     79         <!-- Delete the ${build} directory trees --> 
    8580         <delete dir="${build}" /> 
    86          <delete file="lib/Rapla.jar"/> 
    8781       </target> 
    88  
    8982</project> 
    9083