[BUG] Maven/Gradle builds fail in Claude Code Web cloud environment - DNS resolution failure for repo.maven.apache.org
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Maven and Gradle builds fail in Claude Code Web's cloud environment when attempting to download dependencies from Maven Central. The build fails with a DNS resolution error for repo.maven.apache.org, despite the documentation explicitly listing "JVM: Maven Central, Gradle services" as allowed domains under the package managers allowlist.
This completely blocks Java/Maven development in Claude Code Web.
What Should Happen?
Maven should be able to download dependencies from repo.maven.apache.org (Maven Central) as documented in the allowlist at https://code.claude.com/docs/en/claude-code-on-the-web
Error Messages/Logs
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/3.4.11/spring-boot-starter-parent-3.4.11.pom
[FATAL] Non-resolvable parent POM for com.template:spring-boot-rest-api-template:1.0.0-SNAPSHOT:
The following artifacts could not be resolved: org.springframework.boot:spring-boot-starter-parent:pom:3.4.11 (absent):
Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:3.4.11 from/to central (https://repo.maven.apache.org/maven2):
repo.maven.apache.org: Temporary failure in name resolution
Steps to Reproduce
- Open any Java/Maven project in Claude Code Web (cloud sandbox)
- Run
./mvnw testor./mvnw compile - Observe DNS resolution failure for repo.maven.apache.org
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude Code Web
Platform
Other
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
Similar Issue - Now Fixed
This is similar to #10307 where crates.io (Rust) was blocked despite being documented as allowed. That issue was fixed by adding domains to the NO_PROXY environment variable.
Potential Solution
Add Maven Central domains to NO_PROXY (similar to crates.io fix): repo.maven.apache.org, *.maven.apache.org, repo1.maven.org
Affected Package Managers
- Java: Maven, Gradle
- Potentially other JVM languages (Kotlin, Scala) using Maven Central
References
- Reddit thread with other affected users: https://www.reddit.com/r/ClaudeAI/comments/1oqvajp/claude_code_for_web_cannot_pull_in_dependencies/
- LinkedIn post with root cause analysis: https://www.linkedin.com/pulse/fixing-maven-build-issues-claude-code-web-ccw-tarun-lalwani-8n7oc
- Similar Rust/crates.io issue (fixed): #10307
12 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
The suggested duplicates don't make this issue obsolete:
There doesn't appear to be an open issue actually tracking this problem. These issues keep getting closed as duplicates of each other in a circular pattern, but the underlying issue remains unresolved for JVM tools (Maven/Gradle), .NET (NuGet), and potentially others.
The fix applied for #10307 (adding crates.io to NO_PROXY) was package-manager-specific and didn't address the broader problem: tools that don't respect HTTP_PROXY/HTTPS_PROXY environment variables cannot access their registries through the Claude Code Web proxy.
Could this issue remain open to track the Maven/Gradle case, or could you point me to the actual open issue where this is being addressed?
Agreed, this is definitely broken.
I've not tried this on Maven yet, but this may be a possible workaround. https://www.linkedin.com/pulse/fixing-maven-build-issues-claude-code-web-ccw-tarun-lalwani-8n7oc
However, a similar approach on Gradle does not work, it gets stuck on a 401 error due to
plugins.gradle.orgnot being an allowed domain. Explicitly setting it in allowed hosts doesn't seem to work for me either.I am having this issue with gradle builds. I have asked the agent to fix this but I get this back
Workaround: Local Proxy for Maven Authentication Issues
When Maven fails to authenticate with a corporate/egress proxy (401 Unauthorized), you can work around it by running a local proxy that handles authentication transparently:
1. Create a simple Python proxy (
maven-proxy.py):2. Run the proxy:
3. Configure Maven (
~/.m2/settings.xml):Why this works: Maven connects to localhost without auth, and the local proxy injects the
Proxy-Authorizationheader when forwarding to the upstream proxy. This bypasses Maven's proxy auth implementation issues with complex credentials (like JWT tokens).This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still ocurring
It is a bit unexpected that you need to start all Slack messages with ”@Claude apply the workaround from https://github.com/anthropics/claude-code/issues/13372 and then …”
Will this be fixed eventually?
https://github.com/vaadin/flow/commit/b51d860caa3d74ec938899d57e6ba8991ee61708 is a much simpler workaround without python or custom proxies. Unfortunately it seems that the
SessionStarthook is not executed automatically so you still need to refer to running.claude/hooks/setup-jvm-proxy.shIs this fixed?
We tried to move to CCW, but it looks like basic build things don't work there.
Our simple Maven builds in CCW fail with proxy/DNS issues.
Since this issue has been open for months, it means this is not a reliable workflow for us.
Maybe we are misusing CCW, and it is only for some documentation updates and research sessions, and we need to use GitHub workflows or something else.
Can someone advise on the right workflow instead of Maven builds in CCW?
Has this been fixed? I no longer see the same issue