You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Fred <fr...@namurlug.org> on 2008/06/17 13:21:00 UTC

Download by using a proxy

Hi,

I'm trying to run the very first ivy tutorial described at [1]. When I
execute ant with the provided build.xml, I'm getting http error 407 (proxy
authentication required).

[1] http://ant.apache.org/ivy/history/latest-milestone/tutorial.html

Note that I set ANT_OPTS as described in the FAQ;

set ANT_OPTS=-Dhttp.proxyHost=myproxyhost -Dhttp.proxyPort=8080
-Dhttp.proxyUserName=myproxyusername -Dhttp.proxyPassword=myproxypassword

I seen on ivy jira a few bug reports about proxy usage[2][3], I tried the
suggested fixes but I'm constantly getting the same error.

[2] http://issues.apache.org/jira/browse/IVY-822
[3] http://issues.apache.org/jira/browse/IVY-200

I tested to download the jar manually by using either my browser or wget.
They are working well.

As I'm getting error 407, I can infer a communication with the proxy has
been done somehow. Therefore I'm suspecting that an option name is wrong
or something else... -- maybe one of the value I provided myself is wrong,
but I did double-check those values with wget.

So I'm a bit lost.

Any hints will be appreciated.

Fred.


Re: Download by using a proxy

Posted by Dan North <ta...@gmail.com>.
When I first tried Ivy I spent about a day and a half fighting the proxy
settings (and blaming Ivy). The setproxy task is definitely the way to go.

Cheers,
Dan

2008/6/17 Stefan Bodewig <bo...@apache.org>:

> On Tue, 17 Jun 2008, <fr...@namurlug.org> wrote:
>
> > So... If I'm not wrong, you should update you build.xml by adding
> > setproxy and set the value of the task attributes with the value of
> > properties given as parameters...
>
> <setproxy> does a little bit more than just setting the system
> properties you set via ANT_OPTS, it also registers a
> java.net.Authenticator - the later seems to be what your proxy
> required for Java to work.
>
> Stefan
>

Re: Download by using a proxy

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 17 Jun 2008, <fr...@namurlug.org> wrote:

> So... If I'm not wrong, you should update you build.xml by adding
> setproxy and set the value of the task attributes with the value of
> properties given as parameters...

<setproxy> does a little bit more than just setting the system
properties you set via ANT_OPTS, it also registers a
java.net.Authenticator - the later seems to be what your proxy
required for Java to work.

Stefan

Re: Download by using a proxy

Posted by Fred <fr...@namurlug.org>.
> On Tue, 17 Jun 2008, <fr...@namurlug.org> wrote:
>
>> I'm trying to run the very first ivy tutorial described at [1]. When
>> I execute ant with the provided build.xml, I'm getting http error
>> 407 (proxy authentication required).
>
> Do you know what sort of Proxy you are using?
>
> I've had serious trouble getting past a MS ISA server with NTLM
> authentication using the "built-in proxy support if the JDK" I finally
> gave in and used commons-httpclient instead of Java's URL class.
>
> I realize this doesn't help you with the Ivy case, I'm just trying to
> collect some data.
>
> Can you use Ant's <get> with these ANT_OPTS or using Ant's <setprox>
> task?

Well... Cool, I didn't know these ant tasks... I tested with <setproxy>
and it did work well.

So... If I'm not wrong, you should update you build.xml by adding setproxy
and set the value of the task attributes with the value of properties
given as parameters... and the very first tutorial will work in most cases
:o)

Thanks a lot for the tip!

Fred.



Re: Download by using a proxy

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 17 Jun 2008, <fr...@namurlug.org> wrote:

> I'm trying to run the very first ivy tutorial described at [1]. When
> I execute ant with the provided build.xml, I'm getting http error
> 407 (proxy authentication required).

Do you know what sort of Proxy you are using?

I've had serious trouble getting past a MS ISA server with NTLM
authentication using the "built-in proxy support if the JDK" I finally
gave in and used commons-httpclient instead of Java's URL class.

I realize this doesn't help you with the Ivy case, I'm just trying to
collect some data.

Can you use Ant's <get> with these ANT_OPTS or using Ant's <setprox>
task?

Stefan