[sword-devel] ant build file for jsword

Bobby Nations sword-devel@crosswire.org
Sun, 09 Dec 2001 21:11:23 -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 that there is an on-going port of the sword
library to Java.  Having hung out along the periphery since taking a
meager shot at helping with the EntriesBlock class (in which I have
everything done but the getRawData function ... I find that I can't get
past ingrained tendencies not to do things in certain ways, sorry).  

Anyway, I've been romping around the jsword project, and am ready to
begin contributing to it.  Attached is an ant build file for the stuff
in /jsword/src that will compile the code, create the javadocs, and jar
the class files.  If you wanted to standardize to ant (many java
projects are doing so as we speak), then this would take the place of
the many Makefiles scattered about.

I'm trying to get the stuff in apps to work, but it keeps crashing every
time I attempt to compile with ant.  Eventually, eventually.

Next task, start writing JUnit classes to test the classes themselves. 
Yippee.  BTW, if you've never used JUnit (or one of it's clones), you've
been missing a real treat.


Content-Type: text/plain; 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}"/>