For ANT users and those who can't use MS dependant scripts,
I have created a build.xml for
freemessageboard. 
Attached.

-- 
Christopher William Turner, http://www.cycom.co.uk/ Java development
since 1996
http://club.cycom.co.uk/tms.htm Terminology Management software
http://club.cycom.co.uk/wt.htm  Wind Turbine blade design software
<project name="fmb" default="dist" basedir=".">
    <description>
        freenet message board
    </description>
  <!-- set global properties for this build -->
  <property name="src" location="src"/>
  <property name="build" location="classes"/>
  <property name="dist"  location="dist"/>
  <property name="projectName" value="fmb"/>

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init"
        description="compile the source " >
    <!-- selective Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}" target="1.2" deprecation="on" 
includes="freenetmessageboard/fcpinterface/FCPException.java"/>
    <javac srcdir="${src}" destdir="${build}" target="1.2" deprecation="on" 
includes="freenetmessageboard/Main.java"/>
  </target>

  <target name="images" depends="init">
    <copy todir="${build}" >
        <fileset dir="${src}" casesensitive="yes">
                <include name="**/gui/*.gif"/>
                <include name="**/schach/*.gif"/>
        </fileset>
    </copy>
  </target>

  <target name="runnable" depends="compile,images"/>

  <target name="dist" depends="runnable"
        description="generate the distribution" >
    <!-- Create the distribution directory -->
    <mkdir dir="${dist}"/>

    <!-- Put everything in ${build} into the ${projectName}.jar file -->
    <jar jarfile="${dist}/${projectName}.jar" basedir="${build}">
        <manifest file="MANIFEST.MF">
                <attribute name="Manifest-Version" value="1.0"/>
                <attribute name="Created-By" value="1.2.2 (Sun Microsystems Inc.)"/>
                <attribute name="Main-Class" value="freenetmessageboard.Main"/>
        </manifest>
   </jar>
    <echo message="java -jar ${projectName}.jar" file="${dist}/run.sh"/>
    <echo message="java -jar ${projectName}.jar" file="${dist}/run.bat"/>
  </target>

  <target name="clean"
        description="clean up" >
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}"/>
    <delete dir="${dist}"/>
  </target>
</project>

Reply via email to