Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
115 lines (95 sloc) 3.93 KB
<project name="PerforceCmSystem" default="all" basedir=".">
PerforceCmSystem is a plugin for FitNesse, the wiki wrapper for fit, an acceptance test framework.
<property name="src" location="src" />
<property name="classes" location="classes" />
<property name="lib" location="lib" />
<property name="zipDir" location="dist/PerforceCmSystem" />
<property name="results.dir" location="test-results" />
<path id="classpath">
<pathelement path="classes" />
<fileset dir="${lib}">
<include name="*.jar" />
<exclude name="dummy.jar" />
<target name="all" depends="testbuild" description="Run this target any time you change code or acceptance tests. It will clean, then compile the source, run all the unit test and fintesse acceptance tests." />
<target name="build" depends="clean, compile" description="clean, then compile the source" />
<target name="testbuild" depends="clean, unit_test" description="builds code from scratch, runs all the unit tests and acceptance tests" />
<target name="build_distribution" depends="zip_src, zip_bin" description="The thing you do when distributing a new release." />
<target name="assemble_bin" depends="clean_dist, jar, copy_distribution" description="create the binary distribution" />
<target name="copy_distribution" description="just copy the files into dist">
<tstamp />
<copy todir="dist/PerforceCmSystem">
<fileset dir="extra/release" includes="**" />
<fileset dir="dist" includes="PerforceCmSystem.jar" />
<target name="zip_bin" depends="assemble_bin" description="zip up the binary distribution">
<tstamp />
<zip zipfile="PerforceCmSystem${DSTAMP}.zip" basedir="dist" includes="PerforceCmSystem/**" />
<target name="zip_src" depends="clean_dist" description="Packages all the source into a .zip file">
<tstamp />
<zip zipfile="PerforceCmSystem_src${DSTAMP}.zip">
<fileset dir="${basedir}">
<include name="src/**" />
<include name="lib/**" />
<include name="extra/**" />
<include name="build.xml" />
<exclude name="**/PerforceCmSystem*.zip" />
<target name="jar" depends="build" description="generate the jar file">
<mkdir dir="dist" />
<delete file="dist/PerforceCmSystem.jar" />
<jar jarfile="dist/PerforceCmSystem.jar" basedir="${classes}">
<include name="**/*.class" />
<exclude name="**/*Test.class" />
<exclude name="**/*Test$*.class" />
<exclude name="**/*TestSuite.class" />
<exclude name="**/*TestSuite$*.class" />
<attribute name="Built-By" value="Markus Gärtner" />
<delete dir="${classes}" />
<target name="compile" depends="init" description="compile the source (make)">
<javac srcdir="${src}" destdir="${classes}" classpathref="classpath" debug="true" />
<target name="clean" description="delete everything in the classes directory">
<delete dir="${classes}" />
<mkdir dir="${classes}" />
<delete dir="${results.dir}" />
<target name="unit_test" depends="compile" description="run the unit tests">
<junit fork="yes" printsummary="no" haltonfailure="yes" haltonerror="yes" dir="${basedir}">
<classpath refid="classpath" />
<formatter type="xml" usefile="true" />
<formatter type="plain" usefile="false" />
<batchtest todir="${results.dir}">
<fileset dir="${src}">
<include name="**/*" />
<target name="clean_dist" description="clean out the distribution folder">
<mkdir dir="dist" />
<fileset dir="dist">
<include name="PerforceCmSystem*.zip" />
<include name="PerforceCmSystem.jar" />
<delete dir="dist/PerforceCmSystem" />
<target name="init">
<mkdir dir="${classes}" />
<mkdir dir="${results.dir}" />
<target name="release" depends="testbuild, build_distribution" />