spring-attic / aws-maven

Apache License 2.0
214 stars 175 forks source link

Setting a HTTP proxy for resolving S3 artifacts #23

Open jscruz opened 10 years ago

jscruz commented 10 years ago

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.

damnhandy commented 10 years ago

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 :)

cliffano commented 9 years ago

@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>
CarterWilliam commented 9 years ago

The 'id' field seems to be mandatory!

cliffano commented 9 years ago

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