Support JVM-Config and environment variables for proxy configuration
Affected version
- v3 series
Bug description
Despite dozens of community discussions claiming otherwise on Reddit, Stack Overflow, old Apache bug trackers, and new GitHub Apache bug trackers, neither Maven nor Maven Wrapper support .mvn/jvm.config nor environment variables for simple proxy configuration.
None of the industry standard mechanisms available to Gradle, to other programming languages, to Ant, work in v3 Maven.
- Industry standard, cURL based environment variables:
http_proxy,http_proxy,no_proxy - UPPERCASE environment variables:
HTTP_PROXY,HTTPS_PROXY,NO_PROXY - Maven wrapper
.mvn/jvm.configfiles - Maven's environment variables:
MAVEN_ARGS,MAVEN_OPTS - JVM standard
JAVA_OPTSenvironment variable
As a workaround, settings.xml can be hardcoded to apply a proxy configuration. But this makes it significantly harder to override partial Maven configurations, compared with environment variables.
This is intentional, user must "tell" Maven Apache transport to observe these properties.
Have you tried the property aether.connector.http.useSystemProperties from documentation [1]? In that case properties are observed, as explained here [2].
[1] https://maven.apache.org/resolver-archives/resolver-1.9.24/configuration.html [2] https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html
Computers exist to automate, not incur additional labor.
The JVM already has fairly standard parameters to configure transport details. Other Java components already follow them. Maven is an outlier for requiring reminding.
Maven is notorious for exactly this kind of boilerplate.
If there's a question of backwards compatibility, announce the change ahead of time, and do so in a major version increment.
On Mon, Aug 11, 2025 at 9:23 AM, Tamas Cservenak @.***(mailto:On Mon, Aug 11, 2025 at 9:23 AM, Tamas Cservenak < wrote:
cstamas left a comment (apache/maven#11011)
This is intentional, user must "tell" Maven Apache transport to observe these properties.
Have you tried the property aether.connector.http.useSystemProperties from documentation [1]? In that case properties are observed, as explained here [2].
[1] https://maven.apache.org/resolver-archives/resolver-1.9.24/configuration.html [2] https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Terrible, indeed.
Computers exist to automate, not incur additional labor.
The JVM already has fairly standard parameters to configure transport details. Other Java components already follow them. Maven is an outlier for requiring reminding.
Maven is notorious for exactly this kind of boilerplate.
If there's a question of backwards compatibility, announce the change ahead of time, and do so in a major version increment. …
So it's just about adding aether.connector.http.useSystemProperties=true in your maven configuration file. Have you tried that ? Not that much boilerplate really.