apache / apache/maven

Support JVM-Config and environment variables for proxy configuration

Open
#11,011 12 comments 1 reaction 0 assignees View on GitHub
invalid
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
21h 11m
Merged PRs (30d)
312

Description

### 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.config` files
* Maven's environment variables: `MAVEN_ARGS`, `MAVEN_OPTS`
* JVM standard `JAVA_OPTS` environment 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.

Contributor guide

Open the contributing guide

Research direction

Review the requested .mvn/jvm.config and settings.xml paths alongside the listed proxy, Maven, and JVM environment variables. Inspect linked pull request #11776 before starting, since it is merged. Done means the requested proxy configuration mechanisms and their scope are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.