[sword-devel] Build file for jsword

Bobby Nations sword-devel@crosswire.org
Sun, 09 Dec 2001 21:13:32 -0600

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


I'm pumped to find out about jsword, the java port of sword.  As a small
token of my appreciation for the work done by everyone so far, I'm
attaching an ant build file for the jsword project.  By default, it will
compile and jar all of the java files under 'jsword/src' into
'jsword/dist/sword.jar', and it will also create the javadocs under
'jsword/dist/api'.  There's a clean target as well to remove temporary
directories such as dist.

Hope you like it, and I would love to contribute more to the ongoing
porting efforts.



Content-Type: text/xml; charset=us-ascii;
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;

<?xml version="1.0" encoding="iso-8859-1"?>
<project name="jsword" default="jar" basedir=".">

    <!-- Set the project wide classpath -->
    <path id="project.classpath">
        <pathelement path="${java.class.path}/"/>
        <pathelement location="./"/>
        <fileset dir="lib">
            <include name="**/*.jar"/>

    <target name="init">
	<property name="src.dir" value="src" />
	<property name="build.dir" value="btree" />
	<property name="dist.dir" value="dist" />
	<property name="javadoc.dir" value="${dist.dir}/api" />
	<property name="build.compiler" value="modern" />

    <target name="createDir" depends="init">
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${dist.dir}"/>
        <mkdir dir="${javadoc.dir}"/>

    <target name="javadoc" depends="createDir">
        <javadoc destdir="${javadoc.dir}"
		 packagenames="SwordMod, sword, org.crosswire.sword.*, 
            <classpath refid="project.classpath"/>

    <target name="compile" depends="javadoc">
        <javac srcdir="${src.dir}"
            destdir="${build.dir}" optimize="on"

    <target name="jar" depends="compile">
        <jar jarfile="${dist.dir}/sword.jar" basedir="${build.dir}"/>

    <target name="modedit" depends="createDir">
        <javac srcdir="apps/ModEdit/${src.dir}"
               destdir="${build.dir}" optimize="on"

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