2 <project name="cephfs-java" default="main" basedir=".">
4 <description>CephFS Java Bindings</description>
6 <property name="src.dir" location="java" />
7 <property name="doc.dir" location="doc" />
8 <property name="test.dir" location="test" />
10 <property environment="env"/>
13 <delete dir="${doc.dir}" />
15 <fileset dir="${test.dir}" includes="**/*.class" />
17 <delete file="./libcephfs-test.jar" />
20 <target name="makedir">
21 <mkdir dir="${doc.dir}" />
24 <target name="docs" depends="makedir">
25 <javadoc packagenames="src" sourcepath="${src.dir}" destdir="${doc.dir}">
26 <fileset dir="${src.dir}">
27 <include name="**/*.java" />
32 <target name="compile-tests-jar">
33 <javac srcdir="${test.dir}" destdir="${test.dir}"
34 includeantruntime="false" source="1.5" target="1.5">
36 <pathelement location="${env.CEPHFS_JAR}"/>
37 <pathelement location="libcephfs.jar"/>
38 <pathelement location="${env.CLASSPATH}" />
41 <jar destfile="./libcephfs-test.jar">
42 <fileset dir="${test.dir}" includes="**/*.class"/>
46 <target name="test" depends="compile-tests-jar">
47 <junit printsummary="yes" haltonfailure="yes" showoutput="yes" fork="true">
48 <sysproperty key="java.library.path" path="${env.CEPHFS_JNI_LIB}:../.libs/"/>
49 <sysproperty key="CEPH_CONF_FILE" path="${env.CEPHFS_CONF}"/>
50 <jvmarg value="-Xcheck:jni"/>
52 <pathelement location="${env.CEPHFS_JAR}"/>
53 <pathelement location="libcephfs.jar"/>
54 <pathelement location="libcephfs-test.jar"/>
56 <formatter type="plain"/>
57 <test name="com.ceph.fs.CephAllTests" haltonerror="true" />
61 <target name="test-compat" depends="compile-tests-jar">
62 <junit printsummary="yes" haltonfailure="yes" showoutput="yes" fork="true">
63 <sysproperty key="java.library.path" path="${env.CEPHFS_JNI_LIB}:../.libs/"/>
64 <sysproperty key="CEPH_CONF_FILE" path="${env.CEPHFS_CONF}"/>
66 <pathelement location="${env.CEPHFS_JAR}"/>
67 <pathelement location="libcephfs.jar"/>
68 <pathelement location="libcephfs-test.jar"/>
70 <formatter type="plain"/>
71 <test name="com.ceph.fs.CephAllTests" haltonerror="true" />