How to set Proxy Settings in Ant deployment in Salesforce?

How to set Proxy Settings in Ant deployment in Salesforce?

Code to be added in build.properties:


proxy.host = Proxy_Host
proxy.port = Port_Number
proxy.user = Username
proxy.pwd = Password

Code to be added in build.xml:

<target name=”proxy”>
<property name=”proxy.host” value=”${proxy.host}” />
<property name=”proxy.port” value=”${proxy.port}”/>
<property name=”proxy.user” value=”${proxy.user}”/>
<property name=”proxy.pwd” value=”${proxy.pwd}”/>
<setproxy proxyhost=”${proxy.host}” proxyport=”${proxy.port}” proxyuser=”${proxy.user}” proxypassword=”${proxy.pwd}” />
</target>

Cheers!!!

Leave a Reply