Bug 37595 - setProxy bug
Summary: setProxy bug
Status: RESOLVED DUPLICATE of bug 32667
Alias: None
Product: Ant
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.5.3
Hardware: Other Windows 2000
: P2 major (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-22 22:16 UTC by Gayatri
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gayatri 2005-11-22 22:16:41 UTC
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.
Comment 1 Steve Loughran 2005-11-23 15:10:02 UTC
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.
Comment 2 Gayatri 2005-11-23 15:45:54 UTC
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.

Comment 3 Steve Loughran 2005-11-23 17:37:48 UTC
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.
Comment 4 Stefan Bodewig 2006-04-12 21:36:31 UTC
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?
Comment 5 Steve Loughran 2006-06-27 18:33:39 UTC

*** This bug has been marked as a duplicate of 32667 ***