<project default="install">
<property name="build.sysclasspath" value="ignore"/>
<property name="libdir" value="/lib"/>
<property name="builddir" value="build"/>
<property name="classesdir" value="${builddir}/classes"/>
<property name="target-vm" value="1.7"/>
<property name="owlapi-jars" value="lib/owlapi-osgidistribution-3.5.2.jar lib/guava-18.0.jar lib/trove4j-3.0.3.jar"/>
<property name="fact-jar" value="uk.ac.manchester.cs.owl.factplusplus-P5.0-v1.6.3.1.jar"/>
<property environment="env"/>
<path id="classpath">
<fileset dir="${libdir}">
<include name="*.jar"/>
</fileset>
</path>
<condition property="vm.ok">
<matches string="${java.version}" pattern="^${target-vm}\." />
</condition>
<target name="vm.warning" unless="${vm.ok}">
<echo level="warning">
Java version in use is ${java.version} but should be ${target-vm}.x!
Either adjust the 'target-vm' property in the build.xml or use a compatible JVM.
</echo>
</target>
<target name="clean">
<delete dir="${builddir}"/>
</target>
<target name="compile" depends="vm.warning">
<mkdir dir="${classesdir}/locality"/>
<javac srcdir="./" destdir="${classesdir}/locality" debug="on">
<classpath refid="classpath"/>
<include name="de/unibremen/informatik/locality/*.java"/>
</javac>
<mkdir dir="${classesdir}"/>
<javac srcdir="./" destdir="${classesdir}" debug="on">
<classpath refid="classpath"/>
<include name="de/unibremen/informatik/*.java"/>
</javac>
</target>
<target name="install" depends="clean,jar,copy-libs,fact,fact-prover">
<copy file="${builddir}/OWL2Parser.jar" todir="../"/>
<copy file="${builddir}/OWLLocality.jar" todir="../"/>
</target>
<target name="fact">
<mkdir dir="${classesdir}/Fact"/>
<mkdir dir="/lib/native/i686"/>
<mkdir dir="/lib/native/x86_64"/>
<javac srcdir="./" destdir="${classesdir}/Fact" debug="on">
<classpath refid="classpath"/>
<include name="de/unibremen/informatik/Fact/*.java"/>
</javac>
<jar basedir="${classesdir}/Fact" destfile="${builddir}/OWLFact.jar">
<manifest>
<attribute name="Title" value="OWL Fact"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="de.unibremen.informatik.Fact.Fact"/>
<attribute name="Class-Path" value="${owlapi-jars} lib/${fact-jar}"/>
</manifest>
</jar>
<copy file="${builddir}/OWLFact.jar" todir="../"/>
<copy file="lib/native/i686/libFaCTPlusPlusJNI.so" todir="/lib/native/i686/" failonerror="false" />
<copy file="lib/native/x86_64/libFaCTPlusPlusJNI.so" todir="/lib/native/x86_64/" failonerror="false" />
<copy file="${libdir}/${fact-jar}" todir="/lib/"/>
</target>
<target name="fact-prover">
<mkdir dir="${classesdir}/FactProver"/>
<mkdir dir="/lib/native/i686"/>
<mkdir dir="/lib/native/x86_64"/>
<javac srcdir="./" destdir="${classesdir}/FactProver" debug="on">
<classpath refid="classpath"/>
<include name="de/unibremen/informatik/FactProver/*.java"/>
</javac>
<jar basedir="${classesdir}/FactProver" destfile="${builddir}/OWLFactProver.jar">
<manifest>
<attribute name="Title" value="OWL Fact Prover"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="de.unibremen.informatik.FactProver.Prove"/>
<attribute name="Class-Path" value="${owlapi-jars} lib/${fact-jar}"/>
</manifest>
</jar>
<copy file="${builddir}/OWLFactProver.jar" todir="../"/>
<copy file="lib/native/i686/libFaCTPlusPlusJNI.so" todir="/lib/native/i686/" failonerror="false" />
<copy file="lib/native/x86_64/libFaCTPlusPlusJNI.so" todir="/lib/native/x86_64/" failonerror="false" />
<copy file="${libdir}/${fact-jar}" todir="/lib/"/>
</target>
<target name="java-files" depends="install"/>
<target name="java-libs" depends="copy-libs"/>
<target name="jar" depends="compile">
<jar basedir="${classesdir}/locality" destfile="${builddir}/OWLLocality.jar">
<manifest>
<attribute name="Title" value="OWL Locality Checker"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="de.unibremen.informatik.locality.LocalityChecker"/>
<attribute name="Class-Path" value="${owlapi-jars}"/>
</manifest>
</jar>
<jar basedir="${classesdir}" destfile="${builddir}/OWL2Parser.jar">
<manifest>
<attribute name="Title" value="OWL2 MNO Parser"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="OWL2Parser"/>
<attribute name="Class-Path" value="${owlapi-jars}"/>
</manifest>
</jar>
</target>
<target name="copy-libs">
<mkdir dir="/lib"/>
<copy todir="/lib/">
<fileset dir="${libdir}" excludes="native"/>
</copy>
</target>
</project>