Maven's repository proxy can fetch dependencies without configuring an HTTP request made by a test. Configure the client in the test JVM.

If that client honors Java's HTTPS proxy properties, place this fragment inside the relevant Surefire plugin's configuration element:

<systemPropertyVariables>
  <https.proxyHost>proxy.example</https.proxyHost>
  <https.proxyPort>8080</https.proxyPort>
</systemPropertyVariables>

Replace the example endpoint. For tests against public destinations where public intermediaries are allowed, the HTTP proxy list offers host and port candidates. The host and port are separate values; select the property family appropriate to the destination scheme and library. A client built with an explicit proxy object needs its own configuration interface instead.

Surefire commonly runs tests in a forked JVM. Not every option used to launch Maven reaches that process. Startup-sensitive system-proxy discovery needs its option on the test JVM at startup. Even when tests share a process, a library can ignore default Java proxy properties.

Keep internal direct destinations covered by an appropriate bypass rule, proxy authentication separate from destination authentication, and certificate verification enabled. Disabling forking changes how tests execute; changing a dependency mirror changes repository resolution. Neither supplies a missing test-client route. Copying all system properties can also expose secrets.

For a remaining failure, record the test JVM, HTTP library, target, selected proxy and first failed stage. Those observations point to the test configuration while leaving the working repository downloads understandable.

Mikanda mikatakata