Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 262 lines (223 sloc) 7.76 KB
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="build.scumd">
<property name="depend.lib.dir" value="depend/lib" />
<property name="lib.dir" value="lib" />
<property name="jgit.dir" value="depend/jgit" />
<property name="jgit.build.dir" value="build/jgit/srcbuild" />
<property name="jgit.test.build.dir" value="build/jgit/test/build" />
<property name="jgit.src.dir" value="${jgit.dir}/org.spearce.jgit/src" />
<property name="jgit.test.src.dir" value="${jgit.dir}/org.spearce.jgit.test/tst"/>
<property name="minasshd.dir" value="depend/minasshd" />
<property name="minasshd.build.dir" value="build/minasshd/srcbuild" />
<property name="minasshd.test.build.dir" value="build/minasshd/testbuild" />
<property name="scumd.src.dir" value="src/main/java" />
<property name="scumd.test.src.dir" value="src/test/java" />
<property name="scumd.exttest.src.dir" value="src/exttest/java" />
<property name="scumd.build.dir" value="build/scumd/srcbuild" />
<property name="scumd.test.build.dir" value="build/scumd/testbuild" />
<property name="scumd.exttest.build.dir" value="build/scumd/exttestbuild" />
<property name="scumd.resource.dir" value="src/main/resources" />
<!-- test libs -->
<path id="testlibs.classpath">
<fileset dir="testlib">
<include name="*.jar" />
</fileset>
</path>
<!-- jgit -->
<target name="jgit.clean">
<delete dir="${jgit.build.dir}" failonerror="false" />
<delete dir="${jgit.test.build.dir}" failonerror="false" />
<mkdir dir="${jgit.build.dir}" />
<mkdir dir="${jgit.test.build.dir}" />
</target>
<path id="jgit.build.classpath">
<fileset dir="${jgit.dir}/org.spearce.jgit/lib">
<include name="*.jar" />
</fileset>
</path>
<target name="jgit.build" depends="jgit.clean">
<javac destdir="${jgit.build.dir}" classpathref="jgit.build.classpath" srcdir="${jgit.src.dir}" />
</target>
<target name="jgit.build.test" depends="jgit.clean">
<javac destdir="${jgit.test.build.dir}"
classpathref="jgit.build.classpath"
srcdir="${jgit.test.src.dir}">
<classpath>
<pathelement path="${jgit.build.dir}" />
<path refid="testlibs.classpath" />
</classpath>
</javac>
<copy todir="${jgit.test.build.dir}">
<fileset dir="${jgit.dir}/org.spearce.jgit.test/tst-rsrc">
<include name="**" />
</fileset>
</copy>
</target>
<target name="jgit.test" depends="jgit.build, jgit.build.test">
<junit printsummary="withOutAndErr"
haltonfailure="true"
includeAntRuntime="yes"
showoutput="true"
fork="true"
maxmemory="128M"
dir="${jgit.dir}">
<classpath>
<pathelement path="${jgit.build.dir}" />
<pathelement path="${jgit.test.build.dir}" />
<path refid="testlibs.classpath" />
<path refid="jgit.build.classpath" />
</classpath>
<formatter type="plain" />
<batchtest todir="testoutput">
<fileset dir="${jgit.test.src.dir}">
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="jgit.jar" depends="jgit.test">
<jar destfile="${depend.lib.dir}/jgit.jar">
<fileset dir="${jgit.build.dir}">
<include name="**" />
</fileset>
</jar>
<antcall target="jgit.clean" />
</target>
<!-- minasshd -->
<target name="minasshd.clean">
<delete dir="${minasshd.build.dir}" failonerror="false" />
<delete dir="${minasshd.test.build.dir}" failonerror="false" />
<mkdir dir="${minasshd.build.dir}" />
<mkdir dir="${minasshd.test.build.dir}" />
</target>
<path id="minasshd.build.classpath">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
<target name="minasshd.build" depends="minasshd.clean">
<javac destdir="${minasshd.build.dir}" classpathref="minasshd.build.classpath">
<src path="${minasshd.dir}/sshd-core/src/main/java" />
<src path="${minasshd.dir}/sshd-core/src/main/filtered-resources" />
<src path="${minasshd.dir}/sshd-pam/src/main/java" />
</javac>
</target>
<target name="minasshd.test" depends="minasshd.build">
</target>
<target name="minasshd.jar" depends="minasshd.test">
<jar destfile="${depend.lib.dir}/minasshd.jar">
<fileset dir="${minasshd.build.dir}">
<include name="**" />
</fileset>
</jar>
<antcall target="minasshd.clean" />
</target>
<!-- scumd -->
<target name="rebuild.dependencies" depends="jgit.jar, minasshd.jar" />
<target name="clean">
<delete dir="${scumd.build.dir}" failonerror="false" />
<delete dir="${scumd.test.build.dir}" failonerror="false" />
<delete dir="${scumd.exttest.build.dir}" failonerror="false" />
<mkdir dir="${scumd.build.dir}" />
<mkdir dir="${scumd.test.build.dir}" />
<mkdir dir="${scumd.exttest.build.dir}" />
</target>
<path id="scumd.build.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${depend.lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<target name="build.scumd" depends="clean, resources">
<javac destdir="${scumd.build.dir}" classpathref="scumd.build.classpath" srcdir="${scumd.src.dir}">
</javac>
</target>
<target name="resources" depends="clean">
<copy todir="${scumd.build.dir}">
<fileset dir="${scumd.resource.dir}">
<exclude name="**.java" />
</fileset>
</copy>
</target>
<target name="build.scumd.test" depends="build.scumd, resources">
<javac destdir="${scumd.test.build.dir}" srcdir="${scumd.test.src.dir}">
<classpath>
<pathelement path="${scumd.build.dir}" />
<path refid="scumd.build.classpath" />
<path refid="testlibs.classpath" />
</classpath>
</javac>
</target>
<target name="scumd.test" depends="build.scumd.test">
<junit printsummary="withOutAndErr"
haltonfailure="true"
includeAntRuntime="yes"
showoutput="true"
fork="true"
maxmemory="128M">
<classpath>
<pathelement path="${scumd.build.dir}" />
<pathelement path="${scumd.test.build.dir}" />
<path refid="testlibs.classpath" />
<path refid="scumd.build.classpath" />
</classpath>
<formatter type="plain" />
<batchtest todir="testoutput">
<fileset dir="${scumd.test.src.dir}">
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="build.scumd.exttest" depends="build.scumd, resources">
<javac destdir="${scumd.exttest.build.dir}" srcdir="${scumd.exttest.src.dir}">
<classpath>
<pathelement path="${scumd.build.dir}" />
<path refid="scumd.build.classpath" />
<path refid="testlibs.classpath" />
</classpath>
</javac>
</target>
<target name="scumd.exttest" depends="build.scumd.exttest">
<junit printsummary="withOutAndErr"
haltonfailure="true"
includeAntRuntime="yes"
showoutput="true"
fork="true"
maxmemory="128M">
<classpath>
<pathelement path="${scumd.build.dir}" />
<pathelement path="${scumd.exttest.build.dir}" />
<path refid="testlibs.classpath" />
<path refid="scumd.build.classpath" />
</classpath>
<formatter type="plain" />
<batchtest todir="testoutput">
<fileset dir="${scumd.exttest.src.dir}">
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="test" depends="scumd.test, scumd.exttest" />
<target name="run">
<java classname="com.asolutions.scmsshd.SCuMD" >
<classpath>
<path refid="scumd.build.classpath" />
<pathelement path="${scumd.build.dir}" />
</classpath>
<arg value="config.xml" />
</java>
</target>
<target name="run.noauth">
<java classname="com.asolutions.scmsshd.SCuMD" >
<classpath>
<path refid="scumd.build.classpath" />
<pathelement path="${scumd.build.dir}" />
</classpath>
<arg value="noauth.xml" />
</java>
</target>
</project>