b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco<?xml version="1.0" encoding="UTF-8"?>
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco<!--
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoDO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoCopyright (c) 2006, 2016 Oracle and/or its affiliates. All rights reserved.
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoOracle and Java are registered trademarks of Oracle and/or its affiliates.
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoOther names may be trademarks of their respective owners.
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoThe contents of this file are subject to the terms of either the GNU
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoGeneral Public License Version 2 only ("GPL") or the Common
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoDevelopment and Distribution License("CDDL") (collectively, the
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco"License"). You may not use this file except in compliance with the
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoLicense. You can obtain a copy of the License at
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscohttp://www.netbeans.org/cddl-gplv2.html
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscoor nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscospecific language governing permissions and limitations under the
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoLicense. When distributing the software, include this License Header
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoNotice in each file and include the License file at
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosconbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscoparticular file as subject to the "Classpath" exception as provided
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscoby Oracle in the GPL Version 2 section of the License file that
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscoaccompanied this code. If applicable, add the following below the
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoLicense Header, with the fields enclosed by brackets [] replaced by
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscoyour own identifying information:
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco"Portions Copyrighted [year] [name of copyright owner]"
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoIf you wish your version of this file to be governed by only the CDDL
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscoor only the GPL Version 2, indicate your decision by adding
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco"[Contributor] elects to include this software in this distribution
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscounder the [CDDL or GPL Version 2] license." If you do not indicate a
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscosingle choice of license, a recipient has the option to distribute
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscoyour version of this file under either the CDDL, the GPL Version 2 or
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscoto extend the choice of license to its licensees as provided above.
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoHowever, if you add GPL Version 2 code and therefore, elected the GPL
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoVersion 2 license, then the option applies only if the new code is
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Koscomade subject to such option by the copyright holder.
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos KoscoContributor(s):
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco-->
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco<project default="-deploy-ant" basedir=".">
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <target name="-init" if="deploy.ant.enabled">
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <property file="${deploy.ant.properties.file}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <tempfile property="temp.module.folder" prefix="tomcat" destdir="${java.io.tmpdir}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <unwar src="${deploy.ant.archive}" dest="${temp.module.folder}">
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <patternset includes="META-INF/context.xml"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco </unwar>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <xmlproperty file="${temp.module.folder}/META-INF/context.xml"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <delete dir="${temp.module.folder}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco </target>
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco <target name="-check-credentials" if="deploy.ant.enabled" depends="-init">
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco <fail message="Tomcat password has to be passed as tomcat.password property.">
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco <condition>
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco <not>
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco <isset property="tomcat.password"/>
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco </not>
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco </condition>
ad0b633ade6931f350b9ec745e5599d6afe6d6b3Lubos Kosco </fail>
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco </target>
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco <target name="-deploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/>
34ce5c2f0e9b0f6bf05895501c9f7171d4a5bab7Lubos Kosco <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
34ce5c2f0e9b0f6bf05895501c9f7171d4a5bab7Lubos Kosco classpath="${tomcat.home}/server/lib/catalina-ant.jar"/>
34ce5c2f0e9b0f6bf05895501c9f7171d4a5bab7Lubos Kosco <deploy url="${tomcat.url}/manager" username="${tomcat.username}"
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco password="${tomcat.password}" path="${Context(path)}"
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco war="${deploy.ant.archive}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <property name="deploy.ant.client.url" value="${tomcat.url}${Context(path)}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco </target>
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco <target name="-undeploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco <echo message="Undeploying ${Context(path)}"/>
34ce5c2f0e9b0f6bf05895501c9f7171d4a5bab7Lubos Kosco <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"
34ce5c2f0e9b0f6bf05895501c9f7171d4a5bab7Lubos Kosco classpath="${tomcat.home}/server/lib/catalina-ant.jar"/>
34ce5c2f0e9b0f6bf05895501c9f7171d4a5bab7Lubos Kosco <undeploy url="${tomcat.url}/manager" username="${tomcat.username}"
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco password="${tomcat.password}" path="${Context(path)}"/>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco </target>
b34561d2c3d92fac37dbced05ba6a8738e3d20e9Lubos Kosco</project>