File:  [mozdev] / bookie / server / build.xml
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Sat Feb 1 21:18:45 2003 UTC (16 years, 2 months ago) by will
Branches: MAIN
CVS tags: HEAD
Added a server.sh, changed the xml-rpc library, tweaked a few classses, got the build scripts in a decent order.

<project name="Bookie" default="dist" basedir=".">

    <!-- Give user a chance to override without editing this file
         (and without typing -D each time it compiles it) -->
    <property file="build.properties" />    

    <!-- Generic project properties -->
    <property name="project.version" value="1.2"/>
    <property name="project.name.text" value="Bookie"/>
    <property name="project.name.short" value="bookie"/>

    <!-- Miscellaneous settings -->
    <property name="year" value="1998-2001"/>
    <property name="debug" value="on"/>
    <property name="optimize" value="off"/>
    <property name="deprecation" value="off"/>

    <!--
       ========================================================================
         Set the properties related to the build area
       ========================================================================
    -->        

    <path id="project.class.path">
        <pathelement location="${xmlrpc.jar}"/>
        <pathelement location="${servlet.jar}"/>        
        <pathelement location="${log4j.jar}"/>
        <pathelement location="${xmlparser.jar}"/>
        <pathelement location="${jisp.jar}"/>   
        <pathelement location="${collections.jar}"/>    
    </path>
    
    <target name="all" depends="clean, dist"/>
    
    <!--
       ========================================================================
         Initialize the build. Must be called by all targets
       ========================================================================
    -->
    <target name="init">
        <tstamp/>

        <echo message="--------- ${project.name.text} ${project.version} ---------"/>
        <echo message=""/>

        <echo message="java.class.path = ${java.class.path}"/>
        <echo message=""/>
        <echo message="java.home = ${java.home}"/>
        <echo message="user.home = ${user.home}"/>
        <echo message=""/>
        <echo message="basedir = ${basedir}"/>
    </target>

    <!--
       ========================================================================
         Compiles the source directory
       ========================================================================
    -->
    
    <!--
      Compile the java classes to the build directory.
    -->
    <target name="compile">
        <mkdir dir="${out.classes.dir}"/>
        <javac srcdir="${src.dir}"
            destdir="${out.classes.dir}"
            debug="${debug}"
            deprecation="${deprecation}"
            classpathref="project.class.path">
        </javac>
    </target>

    <!--
      Jar some files
    -->
    <target name="dist" depends="compile">      
      <mkdir dir="${dist.dir}"/>
    
      <jar jarfile="${server.jar}" manifest="inf/MANIFEST.MF">
        <fileset dir="${out.classes.dir}">
          <include name="**/*.class"/>
          <include name="**/*.properties"/>	  
        </fileset>    
	
	<fileset dir="${conf.dir}"/>
	<fileset dir="${resources.dir}"/>
      </jar>
      
      <mkdir dir="${dist.dir}/lib"/>
      <copy todir="${dist.dir}/lib" file="${xmlrpc.jar}"/>
      <copy todir="${dist.dir}/lib" file="${jisp.jar}"/>
      <copy todir="${dist.dir}/lib" file="${xmlparser.jar}"/>
      <copy todir="${dist.dir}/lib" file="${log4j.jar}"/>
      <copy todir="${dist.dir}/lib" file="${collections.jar}"/>
      <copy todir="${dist.dir}/lib" file="${servlet.jar}"/>	

      <copy todir="${dist.dir}" file="bin/server.sh"/>
      <copy todir="${dist.dir}" file="bin/server.bat"/>
      
      <zip zipfile="${server.zip}">
        <fileset dir="${dist.dir}"/>
      </zip>
    </target>  

    <!--
       ========================================================================
         Generate the javadoc
       ========================================================================
    -->    
    <target name="javadoc">
        <mkdir dir="${out.doc.dir}"/>
        <javadoc
            sourcepath="${src.dir}"
            packagenames="com.tersesystems.bookie.*"
            destdir="${out.doc.dir}"
            author="true"
            public="true"
            version="true"
            use="true">
            <classpath refid="project.class.path"/>
        </javadoc>
    </target>

    <target name="clean" depends="init">
    	<delete dir="${dist.dir}"/>        
        <delete dir="${build.dir}"/>
    </target>

</project>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>