<project>
    <property environment="env"/>
	<property name="src.dir" value="${basedir}/src"/>
	<property name="lib.dir" value="${basedir}/lib"/>	
    <property name="lib.sample.home" value="${basedir}/../lib"/>
    <property name="build.home" value="${basedir}/build"/>
    <property name="build.war.home" value="${build.home}/war"/>
    <property name="build.classes.home" value="${build.home}/classes"/>
	
    <target name="deploy" depends="deploy-tomcat, deploy-appserver"/>

    <target name="deploy-appserver" unless="tomcat">
    	<copy file="${build.war.home}/${ant.project.name}.war"
    		              todir="${basedir}/dist"/>
    </target>

    <target name="deploy-tomcat" if="tomcat">
        <copy file="${build.war.home}/${ant.project.name}.war"
              todir="${env.CATALINA_HOME}/webapps"/>
    </target>
</project>
