Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (66 sloc) 3.05 KB
<project name="RestFixture-CI" default="test-integration">
<property name="fitnesse-clone-dir" value="build/fitnesse-git-ro" />
<property name="restfixture-clone-dir" value="build/restfixture-git-ro" />
<path id="git.classpath">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef resource="jgit-ant.properties" classpathref="git.classpath" />
<target name="clone-remotes" depends="clone-remote-fitnesse, clone-remote-restfixture"/>
<target name="test-integration" depends="do-fitnesse, do-restfixture" />
<target name="do-restfixture" depends="pull-remote-restfixture, clone-remote-restfixture, build-restfixture" />
<target name="do-fitnesse" depends="pull-remote-fitnesse, clone-remote-fitnesse, build-fitnesse" />
<target name="build-restfixture" >
<copy file="${fitnesse-clone-dir}/dist/fitnesse.jar"
tofile="${restfixture-clone-dir}/lib/fitnesse/fitnesse.jar" />
<ant antfile="build.xml"
dir="${restfixture-clone-dir}"
inheritall="false"
target="full" >
<!-- property name="skip.metric.jdepend" value="true" / -->
<property name="findbugs.home" value="${basedir}/lib/findbugs" />
</ant>
</target>
<target name="build-fitnesse" if="is-fitnesse-not-uptodate">
<!--
all of this because fitnesse build jar target can't be called via <ant> because
the working directory of the java task in createUpdateLists can't be set.
fitnesse/build.xml expects to be invoked from within the fitnesse directory.
Note: this task requires tools.jar to be avaialble in the classpath for <javac> to work
-->
<java fork="true"
classpathref="git.classpath"
dir="${fitnesse-clone-dir}"
classname="org.apache.tools.ant.launch.Launcher">
<jvmarg value="-Dant.home=${basedir}/lib/ant" />
<arg value="jar" />
</java>
</target>
<target name="pull-remote-restfixture">
<git localDirectory="${restfixture-clone-dir}" verbose="true">
<pull pullFailedProperty="pull-restfixture-failed" modificationExistProperty="is-restfixture-not-uptodate"/>
</git>
</target>
<target name="clone-remote-restfixture" if="pull-restfixture-failed">
<echo>Cloning RestFixture</echo>
<delete dir="${restfixture-clone-dir}" />
<mkdir dir="${restfixture-clone-dir}" />
<git localDirectory="${restfixture-clone-dir}" verbose="true">
<clone uri="git://github.com/smartrics/RestFixture.git" />
</git>
</target>
<target name="pull-remote-fitnesse">
<git localDirectory="${fitnesse-clone-dir}" verbose="true">
<pull pullFailedProperty="pull-fitnesse-failed" modificationExistProperty="is-fitnesse-not-uptodate"/>
</git>
</target>
<target name="clone-remote-fitnesse" depends="pull-remote-fitnesse" if="pull-fitnesse-failed">
<echo>Cloning FitNesse</echo>
<delete dir="${fitnesse-clone-dir}" />
<mkdir dir="${fitnesse-clone-dir}" />
<git localDirectory="${fitnesse-clone-dir}" verbose="true">
<clone uri="git://github.com/unclebob/fitnesse.git" />
</git>
</target>
</project>