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