1 Reply Latest reply on Apr 13, 2006 12:25 AM by Scott Stark

    Proxy again

    Fabiano C. de Oliveira Newbie

      The build.xml have a set.proxy task to take care of someone behind a proxy.

      But Im having problems getting Branch_4_0 because my company use a proxy that needs authentication(dont blame me ... it is my company fault :-).

      So I always have to change build.xml to build the source ... I think that this make sense:

      <condition property="hasproxyauth">
       <isset property="hasproxy"/>
       <isset property="proxy.username"/>
       <isset property="proxy.password"/>
       <equals arg1="" arg2="${proxy.username}" trim="true"/>
       <equals arg1="" arg2="${proxy.password}" trim="true"/>
       <!-- set proxy settings -->
       <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
       <!-- set proxy settings -->
       <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
       <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
       <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
       <!-- set proxy settings using auth -->
       <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
       <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
       <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>

      Can I or you open a JIRA issue for this ?