Added a test.
[yaz4j-moved-to-github.git] / build.xml
1 <project name="yaz4j" default="compile" basedir=".">
2
3   <description>Build the java side of Yaz4J</description>
4
5   <property name="version" value="0.9.3"/>      
6   <property name="src" location="src"/>
7   <property name="test" location="test"/>
8   <property name="bin" location="bin"/>
9   <property name="distributions"  location="distributions"/>
10         
11   <path id="project.classpath">
12     <pathelement location="${bin}"/>
13     <pathelement location="dependencies/JUnit-4.3.1/junit-4.3.1.jar"/>
14   </path>
15
16   <target name="init">
17     <mkdir dir="${bin}"/>
18   </target>
19
20   <target name="compile" depends="init" description="compile the source">
21     <javac srcdir="${src}" destdir="${bin}">
22        <classpath refid="project.classpath"/>
23     </javac>
24   </target>
25
26   <target name="test" depends="compile" description="test the code">
27     <javac srcdir="${test}" destdir="${bin}">
28        <classpath refid="project.classpath"/>
29     </javac>
30   </target>
31
32   <target name="build-dist" depends="compile" description="generate the distribution">
33     <mkdir dir="${distributions}/${version}"/>
34     <jar jarfile="${distributions}/${version}/yaz4j.jar" basedir="${bin}">
35       <manifest>
36         <attribute name="Version" value="${version}"/>
37         <attribute name="Author" value="Talis Information Ltd"/>
38         <attribute name="About" value="Java wrapper for the ZOOM API of YAZ"/>
39         <attribute name="Main-Class" value="org.yaz4j.Yaz4jMain"/>
40       </manifest>
41     </jar>
42     <copy file="libyaz4j/lib/libyaz4j.so" tofile="${distributions}/${version}/libyaz4j.so"/>
43     <copy file="dependencies/yaz-2.1.28/lib/libyaz.so" tofile="${distributions}/${version}/libyaz.so"/>
44   </target>
45
46   <target name="clean" description="clean up" >
47     <!-- Delete various paths as part of the clean trees -->
48     <delete dir="${bin}"/>
49     <!-- delete dir="${distributions}/${version}"/ -->
50   </target>
51
52 </project>