949N/A<?xml version="1.0" encoding="UTF-8"?>
949N/A<project default="-deploy-ant" basedir=".">
949N/A <target name="-init" if="deploy.ant.enabled">
949N/A <property file="${deploy.ant.properties.file}"/>
949N/A <tempfile property="temp.module.folder" prefix="tomcat" destdir="${java.io.tmpdir}"/>
949N/A <unwar src="${deploy.ant.archive}" dest="${temp.module.folder}">
949N/A <patternset includes="META-INF/context.xml"/>
949N/A </unwar>
949N/A <xmlproperty file="${temp.module.folder}/META-INF/context.xml"/>
949N/A <delete dir="${temp.module.folder}"/>
949N/A </target>
1274N/A <target name="-check-credentials" if="deploy.ant.enabled" depends="-init">
1274N/A <fail message="Tomcat password has to be passed as tomcat.password property.">
1274N/A <condition>
1274N/A <not>
1274N/A <isset property="tomcat.password"/>
1274N/A </not>
1274N/A </condition>
1274N/A </fail>
1274N/A </target>
1274N/A <target name="-deploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
949N/A <echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/>
1315N/A <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask">
1315N/A <classpath>
1315N/A <pathelement path="${tomcat.home}/lib/catalina-ant.jar"/>
1315N/A <pathelement path="${tomcat.home}/lib/tomcat-coyote.jar"/>
1315N/A <pathelement path="${tomcat.home}/lib/tomcat-util.jar"/>
1315N/A <pathelement path="${tomcat.home}/bin/tomcat-juli.jar"/>
1315N/A </classpath>
1315N/A </taskdef>
1274N/A <deploy url="${tomcat.url}/manager/text" username="${tomcat.username}"
949N/A password="${tomcat.password}" path="${Context(path)}"
949N/A war="${deploy.ant.archive}"/>
949N/A <property name="deploy.ant.client.url" value="${tomcat.url}${Context(path)}"/>
949N/A </target>
1274N/A <target name="-undeploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
949N/A <echo message="Undeploying ${Context(path)}"/>
1315N/A <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask">
1315N/A <classpath>
1315N/A <pathelement path="${tomcat.home}/lib/catalina-ant.jar"/>
1315N/A <pathelement path="${tomcat.home}/lib/tomcat-coyote.jar"/>
1315N/A <pathelement path="${tomcat.home}/lib/tomcat-util.jar"/>
1315N/A <pathelement path="${tomcat.home}/bin/tomcat-juli.jar"/>
1315N/A </classpath>
1315N/A </taskdef>
1274N/A <undeploy url="${tomcat.url}/manager/text" username="${tomcat.username}"
949N/A password="${tomcat.password}" path="${Context(path)}"/>
949N/A </target>
949N/A</project>