Which Proxy Setting Controls Your Maven Wrapper Download?
Identify the wrapper's bootstrap downloader before configuring the proxy for a failed Maven distribution download.
If mvnw fails while downloading Maven, a working proxy entry in settings.xml may be too late: Maven has not started yet.
Inspect the generated wrapper files in the affected checkout and identify which downloader they run. Maven Wrapper 3.3.4 documents these arrangements:
| Generated type | Where to look for the proxy input |
|---|---|
| only-script | curl or wget on Unix; PowerShell on Windows |
| script | The wrapper JAR download, followed by the Java wrapper path |
| bin | The included wrapper JAR and its Java download path |
| source | The included Java downloader source when used for bootstrapping |
only-script is the documented default for newly generated wrappers. An older checkout keeps its generated files, even if you update the Maven installation on your machine.
Match the setting to that process
For a Unix only-script wrapper using curl or wget, configure that downloader's supported proxy interface; an HTTPS download can use https_proxy. If that distribution download may use a public HTTP proxy, take a candidate address from the HTTP proxy list for this downloader's environment. If the value names a SOCKS server, the downloader must support that protocol too.
MAVEN_OPTS supplies JVM options. It cannot configure a shell's curl process, but JVM proxy properties can matter on a Java downloader path. This is the useful distinction when comparing an older Takari workaround with a different project's wrapper.
Once the distribution download completes and Maven starts, its repository downloads become a separate check against Maven's own proxy configuration. The distribution, wrapper JAR and repositories may be served by different hosts.