<!--

    Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Distribution License v. 1.0, which is available at
    http://www.eclipse.org/org/documents/edl-v10.php.

    SPDX-License-Identifier: BSD-3-Clause

-->

<project>
    <property environment="env"/>
    <property name="as.home" value="${env.AS_HOME}"/>
    <property name="lib.home" value="${env.METRO_HOME}/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"/>
    <property name="domain" value="domain1"/>

    <target name="deploy" depends="deploy-tomcat, deploy-appserver"/>

    <target name="deploy-appserver" unless="tomcat">
        <copy file="${build.war.home}/metro-${ant.project.name}.war"
              todir="${as.home}/domains/${domain}/autodeploy"/>
    </target>

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