Maven Wagon HTTP

This component is an implementation of Wagon provider for HTTP access. It uses Apache HttpComponents Client 4.5.x as lower level layer.

It enables Maven to use remote repositories stored in HTTP servers.


Starting with version 2.0, a pooled http connection manager is used. You can configure it through the following system properties:

  • maven.wagon.http.pool = true/false (default true), enable/disable the pool mechanism.
  • maven.wagon.httpconnectionManager.maxPerRoute = integer (default 20), maximum number of http(s) connection per destination.
  • maven.wagon.httpconnectionManager.maxTotal = integer (default 40), maximum number of http(s) connection.

Other features can be configured through system properties:

  • maven.wagon.http.ssl.insecure = true/false (false by default), enable/disable relaxed check of public key certificates (e.g. self-signed ones). Relaxed check means that any chain with 1 or more certificates will be considered valid if all the certificate dates in the chain are valid (dates check can be overridden as well - see below). Setting it to true also enables usage of the following properties:
    • maven.wagon.http.ssl.allowall = true/false (false by default), whether to match the server's X.509 certificate against a requested IP/DNS name. If false/unset, a regular server check will be used, which means that the server's IP/DNS must match either the first CN, the Subject field or one of the Subject Alternative Name extension values (in case Subject or SAN type is either dNSName or iPAddress - see RFC 5280 for more details). Otherwise, no such matching will be applied.
    • maven.wagon.http.ssl.ignore.validity.dates = true/false (false by default), whether to ignore issues with certificate dates (i.e. when a certificate is expired or not yet valid).
  • maven.wagon.rto = time in ms (default 1800000), read time out.

Since version 3.2, the retry handler can be configured with system properties:

  • maven.wagon.http.retryHandler.class supports this set of values:
    • default will use an instance of DefaultHttpRequestRetryHandler respecting requestSentEnabled, count and nonRetryableClasses.
    • standard will use an instance of StandardHttpRequestRetryHandler respecting requestSentEnabled and count.
    • Any fully qualified name of a HttpRequestRetryHandler implementation will be instantiated with its default constructor.
      This will not work with the shaded version bundled with Maven.
  • maven.wagon.http.retryHandler.requestSentEnabled = requestSentEnabled for default or standard implementations.
  • maven.wagon.http.retryHandler.count = number of retries for default or standard implementations.
  • maven.wagon.http.retryHandler.nonRetryableClasses = a comma-separated list of fully qualified class names bypassing the retries (only the default implementation). If not set, the default value from DefaultHttpRequestRetryHandler will be used.
Any retry handler can only react to exceptions when executing the request and receiving the response head. It will not salvage in-flight failures of ongoing response body streams.