Subversion Repositories splitter

Rev

Rev 21 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?xml version="1.0"?>
<!--
   File: build.xml
   
   Copyright (C) 2006 Steve Ratcliffe
   
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 2 or 3 as
    published by the Free Software Foundation.
   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
   
   
   Author: Steve Ratcliffe
   Create date: 3 Jan 2008
-->
<project name="splitter" default="build" basedir=".">

        <!-- Init -->
  <property name="top" value="."/>

        <!-- This file is not checked into svn, so you can create it and put any
         - property definitions that you want to override those below.
        -->
        <property file="${top}/local.properties"/>

  <property name="build" value="build"/>
  <property name="dist" value="dist"/>
  <property name="build.classes" value="${build}/classes"/>
  <property name="src" value="src"/>
  <property name="doc" value="doc"/>
  <property name="javadoc" value="${doc}/api"/>
  <property name="resources" value="resources"/>

  <path id="main">
    <pathelement location="${build.classes}" />
  </path>

        <!-- Prepare - make all the directories -->
        <target name="prepare">
                <mkdir dir="${build.classes}" />
        </target>

  <target name="compile" depends="prepare" description="main compilation">

    <javac srcdir="${src}" destdir="${build.classes}" debug="yes">
      <include name="**/*.java" />
      <classpath refid="main"/>
    </javac>
  </target>

  <target name="javadoc" description="Create the javadoc">
    <mkdir dir="doc"/>
    <javadoc destdir="${javadoc}">

      <fileset dir="${src}" includes="**/*.java"/>
      <classpath refid="main"/>
    </javadoc>
  </target>


  <target name="dist" depends="build"
         description="Make the distribution area">

    <mkdir dir="${dist}"/>
                <mkdir dir="${dist}/doc/api"/>

    <!-- Make the jar -->
    <jar basedir="${build.classes}" jarfile="${dist}/splitter.jar"
       manifest="${resources}/MANIFEST.MF">
      <include name="**/*.class"/>
                        <include name="*.csv"/>
                        <include name="*.properties"/>
    </jar>

                <copy todir="${dist}/doc" >
                        <fileset dir="doc" includes="*.txt"/>
    </copy>

    <!-- Copy the source code -->
    <copy todir="${dist}/src" >
      <fileset dir="${src}"/>
    </copy>

                <!-- misc -->
    <copy todir="${dist}" >
                        <fileset dir="${basedir}">
                                <include name="README"/>
                                <include name="LICENCE*"/>
                                <include name="build.xml"/>
                                <include name="external.properties"/>
                                <include name="resources/**"/>
                        </fileset>
                </copy>
  </target>

  <!-- Clean everything -->
        <target name="clean">
                <delete dir="${build}" />
        </target>

        <!-- Clobber all generated and built files -->
        <target name="clobber" depends="clean">
                <delete dir="${dist}" />
  </target>

        <!-- Main -->
  <target name="build" depends="compile" >
                <copy todir="${build.classes}">
                        <fileset dir="${resources}">
                                <include name="*.csv"/>
                                <include name="*.properties"/>
                                <include name="**/*.trans"/>
                        </fileset>
                </copy>
  </target>

        <target name="rebuild" depends="clean, build" />

</project>