3832N/A<!--
3832N/A ! CDDL HEADER START
3832N/A !
3832N/A ! The contents of this file are subject to the terms of the
3832N/A ! Common Development and Distribution License, Version 1.0 only
3832N/A ! (the "License"). You may not use this file except in compliance
3832N/A ! with the License.
3832N/A !
3832N/A ! You can obtain a copy of the license at
3832N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
3832N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
3832N/A ! See the License for the specific language governing permissions
3832N/A ! and limitations under the License.
3832N/A !
3832N/A ! When distributing Covered Code, include this CDDL HEADER in each
3832N/A ! file and include the License file at
3832N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
3832N/A ! add the following below this CDDL HEADER, with the fields enclosed
3832N/A ! by brackets "[]" replaced with your own identifying information:
3832N/A ! Portions Copyright [yyyy] [name of copyright owner]
3832N/A !
3832N/A ! CDDL HEADER END
3832N/A !
3832N/A !
3832N/A ! Copyright 2008 Sun Microsystems, Inc.
3832N/A ! -->
3832N/A
3832N/A<project name="proxy">
3832N/A
3832N/A <description>
3832N/A Proxy configuration.
3832N/A </description>
3832N/A
3832N/A <!-- Check proxy configuration -->
3832N/A <target name="check">
3832N/A <if>
3832N/A <equals arg1="${proxy.enabled}" arg2="y"/>
3832N/A <then>
3832N/A <echo>Checking for proxy [${proxy.host}:${proxy.port}]</echo>
3832N/A <echo>as user [${proxy.user}].</echo>
3832N/A <fail message="Proxy [${proxy.host}] is unreachable.">
3832N/A <condition>
3832N/A <and>
3832N/A <not>
3832N/A <http url="${staf.url}"/>
3832N/A </not>
3832N/A <not>
3832N/A <isreachable host="${proxy.host}" timeout="5"/>
3832N/A </not>
3832N/A </and>
3832N/A </condition>
3832N/A </fail>
3832N/A <echo>Proxy detected.</echo>
3832N/A </then>
3832N/A </if>
3832N/A </target>
3832N/A
3832N/A <!-- Set proxy configuration -->
3832N/A <target name="set">
3832N/A <if>
3832N/A <equals arg1="${proxy.enabled}" arg2="y"/>
3832N/A <then>
3832N/A <echo>Configuring proxy...</echo>
3832N/A <setproxy proxyhost="${proxy.host}"
3832N/A proxyport="${proxy.port}"
3832N/A proxyuser="${proxy.user}"
3832N/A proxypassword="${proxy.pass}"/>
3832N/A </then>
3832N/A </if>
3832N/A </target>
3832N/A</project>