ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clifton Craig <>
Subject Re: <setproxy/> doesn't use my authentication...
Date Mon, 14 Nov 2005 13:52:45 GMT
On Monday 14 November 2005 5:40 am, Steve Loughran wrote:
> Clifton Craig wrote:
>  > I'm trying to go over our company proxy with Ivy and I'm having troubles
>  > getting the proxy to see my authentication info (user name/password).
> I'm
>  > using the <setproxy/> task and supplying it with my correct
> authentication
>  > info and It still doesn't work. So I dumbed down the problem a bit
> and tried
>  > to just use the <get/> task to see if setproxy was working right. Get
> was
>  > bailing out without any helpful description of the problem so I broke
> out
>  > beanshell and tried just opening a URL to the apache-ant web site.
> That's
>  > when I started to see 407 errors from the server. I tried various
> renditions
>  > of setproxy and none of them get me through the proxy. I also tried
>  > misspelling the proxyuser and proxypassword attributes to make sure they
>  > we're being read in and not mistyped. My intentional misspelling
> generated an
>  > error as I expected it would. I'm lost. Can anybody help me get
> through our
>  > danged proxy? Thanx in advance!
> I think you may just have found a bug in setproxy, one that couldnt be
> tested except against your network, which is why nobody has found it before
> 1. the best solution would be to find the bug in the proxy class, patch
> it and submit the patch to us in a bugrep. That way we can incorporate
> it into Ant.
> 2. the fastest solution is to work out which -Dhttp.proxy settings you
> need to get any java app work through the firewall, and set the ANT_OPTS
> env variable to that value.
> 3. if you use Java1.5, then the JRE can be told to use IE's/Gnome's/
> Safari's proxy settings. Ant 1.7 will do this automatically, unless told
> not to with the -noproxy option.
> -steve
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Ok, when I get a minute I'll trace the bug and see about filing a bug report 
and/or patch. In the interim, I didn't know about the proxy stuff in the new 
JRE. I run Linux with the KDE desktop, will it pick up my Konqueror proxy 
settings as well or do I have to install/configure gnome to get it to work? 
Right now I'm using a weird patch solution which involves a <scriptdef/> task 
with a beanshell snippet similar to what I found in the Ant source base. I 
basically create an Authenticator and set it as the default. I call and use 
this as a -set-authenticator task/target. I then combine this with the 
setproxy task to set the server and port. The funniest thing is that it seems 
to work without the setproxy task. In other words it's almost  as if the JVM 
already knows what proxy to use and only has trouble with the authentication 
step. That's the only code I have in my script task. I don't really 
understand it. I'm not sure where it gets the proxy info from. I'm not 
supplying it on the cmd line and I'm running JRE 1.4.2. I'll have to play 
with it some more. Thanx for the tip.

Clifton C. Craig, Software Engineer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message