jcaddel / maven-s3-wagon

Multi-threaded wagon to connect Maven with Amazon S3
123 stars 50 forks source link

Proxy server #24

Open exper0 opened 8 years ago

exper0 commented 8 years ago

It seems this s3 wagon doesn't support HTTPS proxy server. At least it doesn't work when using with standard -Dhttps.proxyHost/Port. Environment variable HTTPS_PROXY also doesn't help

davidmoten commented 7 years ago

I'm not using maven-s3-wagon yet but to I do call aws java sdk behind a proxy and have setup a maven plugin to do so aws-maven-plugin.

@jcaddel if you want to add proxy support the change to the aws ClientConfiguration object looks like this:

static ClientConfiguration createConfiguration(Proxy proxy) {
        ClientConfiguration cc = new ClientConfiguration();
        if (host != null) {
            cc.setProxyHost(host);
            cc.setProxyPort(port);
            if (proxy.username != null) {
                cc.setProxyUsername(proxy.username);
                cc.setProxyPassword(proxy.password);
            }
        }
        return cc;
    }

Then obviously you add parameters to your plugin or allow the proxy values to be set via system or environment properties to capture the values in the Proxy object above.