aws-maven icon indicating copy to clipboard operation
aws-maven copied to clipboard

Setting a HTTP proxy for resolving S3 artifacts

Open jscruz opened this issue 10 years ago • 4 comments

Hi, I'm using a HTTP Proxy behind the connection. The problem is when setting this proxy using the configuration of settings.xml following the steps described in http://maven.apache.org/guides/mini/guide-proxies.html.

I tried with protocol "http" but no results. Then I dived into the code and set the protocol to "s3" assuming the project is expecting this.

How can I properly set this proxy?

Thank you.

jscruz avatar Jun 12 '14 15:06 jscruz

Yeah, this is an issue for me as well. The S3 Client in the AWS SDK does not pick up JDK or OS-level proxy settings and you have to explicitly set the proxyHost and the proxyPort. Being able to either define something in either settings.xml or as a property on the command line would be very helpful. I'll lend a hand when if I can come up for air soon :)

damnhandy avatar Sep 05 '14 12:09 damnhandy

@jscruz @damnhandy This works for me:

<proxy>
  <id>s3-proxy</id>
  <active>true</active>
  <protocol>s3</protocol>
  <host>1.2.3.4</host>
  <port>80</port>
  <nonProxyHosts>localhost|127.0.0.1|*.internal</nonProxyHosts>
</proxy>

cliffano avatar Jun 19 '15 07:06 cliffano

The 'id' field seems to be mandatory!

CarterWilliam avatar Jul 22 '15 14:07 CarterWilliam

Correct, the id value is mapped to the URI's protocol.

cliffano avatar Jul 22 '15 22:07 cliffano