In Ant 1.5.3, I am unable to set the HTTP proxy properties properly using either the setProxy target or ANT_OPTS or ANT_ARGS. The first 2 options return a 407 HTTP error code.It basically doesn't pick up the user my credentials. And there seems to be no way to set the proxyuser and proxypassword in Ant 1.5.3. Also ANT_ARGS does not work with respect to the proxy settings. Is this a bug? Is there any way to set the proxy settings and avoid this 407 error? (other than having to migrate to Ant 1.6 or later) Please let me know.
we'll have to look at setproxy to see what is not going on there also, the place to set proxy on the command line is not ANT_ARGS (which passes things to ant), but ANT_OPTS, which is JVM settings like memory and -Dsystem.prop=value options. It will work there unless the JVM itself doesnt work with your proxy.
I did set ANT_OPTS with the following -Dhttp.proxyuser=gg -Dhttp.proxypassword=password1 -Dhttp.proxyHost=host1 - Dhttp.proxyPort=8080 But ant doesnt take the user and password settings and throws me a 407 HTTP error. (Proxy authentication required). I tried again without the user and password settings and I get the same error. Thanks, Gayatri ========== (In reply to comment #1) > we'll have to look at setproxy to see what is not going on there > also, the place to set proxy on the command line is not ANT_ARGS (which passes > things to ant), but ANT_OPTS, which is JVM settings like memory and > -Dsystem.prop=value options. It will work there unless the JVM itself doesnt > work with your proxy.
First, try setting the values using their correct case: http.proxyUser and http.proxyPassword second, I dont see these props listed: http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html Unless you are running java1.5 and can tell the JVM to use your proxy settings: java.net.useSystemProxies, it may be that java -and hence ant- doesnt support your proxy password mechanism. All of Ant's built in http retrieval uses the JDK libraries, see.
This is very likely a duplicate of bug 32667 which is fixed in Ant's code base (and has been since more than a year). Does the task work for you in Ant 1.6.5?
*** This bug has been marked as a duplicate of 32667 ***