Hi,

For those who want to compile castor using an ant build file, I have created 
one and attached it to this e-mail. I personally am not to happy with shell 
scripts/batch files and am a big fan of ant. (Especially since generating 
java doc from it is a really simple task ;) )

I will, if I have any spare time, try and create an ant task for calling the 
castor sourcegenerator. If one already exists please let me know :)

-Roy


<project name="castor" default="jar" basedir=".">

    <!-- this loads the ant global properties -->
    <property file="${user.home}/.ant-global.properties"/>

    <property name="src" value="src/main" />
    <property name="build" value="build/classes" />
    <property name="project" value="castor" />
    <property name="build.sysclasspath" value="ignore"/>
    <property name="projectlib" value="lib" />
    <property name="docs" value="docs"/>

    <!-- CLASSPATH -->
    <path id="base.class.path">
        <pathelement location="${build}" />
        <fileset dir="${projectlib}">
            <include name="**/*.jar"/>
        </fileset>
    </path>

    <target name="init">
        <mkdir dir="${build}" />
        <mkdir dir="jars" />
        <mkdir dir="${docs}"/>
    </target>

    <target name="clean">
        <delete dir="${build}" />
        <delete dir="jars" />
        <delete dir="${docs}"/>
        <delete>
            <fileset dir="${src}" includes="**/*.java">
                <present targetdir="${src}">
                    <mapper type="glob" from="*.java" to="*.ui"/>
                </present>
            </fileset>
        </delete>
    </target>

    <target name="compile" depends="init" description="compile stuff">
        <javac srcdir="${src}" destdir="${build}"
            excludes="**/Test*"
            debug="on"
            fork="${javac.fork}"
            classpathref="base.class.path"/>
    </target>

    <target name="jar" depends="compile" description="create castor jar file">
        <jar jarfile="${project}.jar" filesonly="true">
            <fileset dir="${build}"/>
            <fileset dir="${src}" excludes="**/*.java"/>
        </jar>
    </target>

    <target name="doc" depends="init" description="Build javadoc">
        <javadoc packagenames="uic.*"
            defaultexcludes="yes"
            destdir="${docs}/"
            author="true"
            use="true"
            classpathref="base.class.path"
            windowtitle="Castor" >
            <doctitle><![CDATA[<h1>Castor</h1>]]></doctitle>

            <fileset dir="${src}" includes="**/*.java" excludes="**/Test*" />
            <link href="http://java.sun.com/j2se/1.4.2/docs/api/"; />
        </javadoc>
    </target>
</project>
----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to