build.xml 2.53 KB
Newer Older
1 2 3 4 5 6
<project name="eHive Java" default="jar" basedir=".">
	<description>
    	build file for eHive Java Runnable API
 	</description>

	<property name="src" location="src" />
7
	<property name="t" location="t" />
8 9
	<property name="build" location="build" />
	<property name="lib" location="lib" />
10
	<property name="doc" location="doc" />
11
	<property name="version" value="4.0" />
12 13 14 15 16 17 18 19 20 21 22 23 24

	<path id="wrapper_classpath">
		<fileset dir="${lib}/">
			<include name="*.jar" />
		</fileset>
		<pathelement path="${java.class.path}/" />
	</path>

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

	<target name="compile" depends="init" description="compile source">
25
		<javac includeantruntime="false" srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source">
26
			<!--<compilerarg value="-Xlint:unchecked"/>-->
27 28
			<classpath refid="wrapper_classpath" />
		</javac>
29 30 31
		<javac includeantruntime="false" srcdir="${t}" destdir="${build}" debug="true" debuglevel="lines,vars,source">
			<classpath refid="wrapper_classpath" />
		</javac>
32 33 34 35 36 37 38 39
	</target>

	<target name="jar" depends="compile" description="generate jars">
		<jar jarfile="${lib}/ehive-${version}.jar" basedir="${build}" />
	</target>

	<target name="clean" description="clean up">
		<delete dir="${build}" />
40 41 42
		<delete>
			<fileset dir="${lib}" includes="ehive-*.jar" />
		</delete>
43 44
	</target>

45 46 47 48 49 50 51
	<target name="compile_wrapper" description="checks runnable is compiled" depends="jar">
		<java classname="org.ensembl.hive.CompileWrapper" failonerror="true">
			<arg value="${org.ensembl.hive.module}" />
			<classpath refid="wrapper_classpath" />
		</java>
	</target>

52
	<target name="run_wrapper" description="runs runnable wrapper" depends="jar">
53
		<java classname="org.ensembl.hive.RunWrapper">
54 55 56
			<arg value="${org.ensembl.hive.module}" />
			<arg value="${org.ensembl.hive.pipe_in}" />
			<arg value="${org.ensembl.hive.pipe_out}" />
Dan Staines's avatar
Dan Staines committed
57
			<arg value="${org.ensembl.hive.debug}" />
58 59 60 61
			<classpath refid="wrapper_classpath" />
		</java>
	</target>

62 63 64 65 66 67
	<target name="run_tests" description="runs the test suite" depends="jar">
		<java classname="org.ensembl.hive.TestRunner">
			<classpath refid="wrapper_classpath" />
		</java>
	</target>

68 69 70 71
	<target name="version" description="print the version number">
		<echo>${version}</echo>
	</target>

72 73 74 75 76 77 78 79
	<!-- Generate javadocs for current project into ${doc} -->
	<target name="doc" depends="init" description="generate documentation">
		<delete dir="${doc}" />
		<javadoc sourcepath="${src}" destdir="${doc}">
			<classpath refid="wrapper_classpath" />
		</javadoc>
	</target>
</project>