<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
              Any modifications will be overwritten.
              To include a user specific buildfile here, simply create one in the same
              directory with the processing instruction <?eclipse.ant.import?>
              as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="PackageManager">
    <property environment="env"/>
    <property name="debuglevel" value="source,lines,vars"/>
    <property name="target" value="1.6"/>
    <property name="source" value="1.6"/>
    <path id="PackageManager.classpath">
        <pathelement location="bin"/>
        <pathelement location="../../../../../../../usr/share/java/postgresql.jar"/>
    </path>
    <target name="init">
        <mkdir dir="bin"/>
        <copy includeemptydirs="false" todir="bin">
            <fileset dir="src">
                <exclude name="**/*.launch"/>
                <exclude name="**/*.java"/>
            </fileset>
        </copy>
    </target>
    <target name="clean">
        <delete dir="bin"/>
	<delete file="PackageManager.jar"/>
    </target>
    <target depends="clean" name="cleanall"/>
    <target depends="build-subprojects,build-project" name="build"/>
    <target name="build-subprojects"/>
    <target depends="init" name="build-project">
        <echo message="${ant.project.name}: ${ant.file}"/>
        <javac debug="true" includeantruntime="false" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
            <src path="src"/>
            <classpath refid="PackageManager.classpath"/>
        </javac>
    </target>
    <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
    <target name="PackageList">
        <java classname="de.insignificance.PackageList" failonerror="true" fork="yes">
            <classpath refid="PackageManager.classpath"/>
        </java>
    </target>
    <target name="jar" description="Create Jar file" depends="build">
        <jar jarfile="PackageManager.jar" basedir="bin" includes="**/*.class" />
    </target>
    <target name="install" description="Install webapp into tomcat directory" depends="jar">
	<property name="installprefix" value="/var/lib/tomcat7/webapps/PackageManager"/>
        <copy todir="${installprefix}"> 
            <fileset dir="webapp">
		<exclude name="**/tools.xml"/>
                <exclude name="debian"/>
		<exclude name="mkdist.sh"/>
		<exclude name="*.spec"/>
            </fileset>
        </copy>
        <copy file="PackageManager.jar" todir="${installprefix}/WEB-INF/lib"/>
    </target>
</project>
