# Could not transfer artifact com.example:lib:1.0.0 from/to central (https://repo.maven.apache.org/maven2): authentication failed for proxy: Proxy authentication required

- **ID:** `java/maven-proxy-authentication-failure`
- **Domain:** java
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Maven is configured to use a proxy that requires authentication, but the credentials are missing or incorrect.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 8+ | active | — | — |

## Workarounds

1. **Configure the proxy with correct credentials in settings.xml** (95% success)
   ```
   <proxies><proxy><id>myproxy</id><username>user</username><password>pass</password><host>proxy.company.com</host><port>8080</port></proxy></proxies>
   ```
2. **Use environment variables for proxy authentication** (90% success)
   ```
   export MAVEN_OPTS='-Dhttp.proxyHost=proxy.company.com -Dhttp.proxyPort=8080 -Dhttp.proxyUser=user -Dhttp.proxyPassword=pass'
   ```

## Dead Ends

- **Disabling the proxy in settings.xml** — If the network requires a proxy, disabling it will cause connection timeouts. (80% fail)
- **Using incorrect credentials in settings.xml** — The proxy will reject the authentication, and the build will fail. (90% fail)
