Enable usage of system properties for HttpClient
This allows using Extended Authentication behind a proxy, as it advices
the HttpClient to use the JVM's standard system properties for
proxies (https://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html).
@@ -91,7 +91,7 @@ public class EcrExtendedAuth {
}
CloseableHttpClient createClient() {
- return HttpClients.createDefault();
+ return HttpClients.custom().useSystemProperties().build();
}
private JSONObject executeRequest(CloseableHttpClient client, HttpPost request) throws IOException, MojoExecutionException {
