Maven Failed to read artifact descriptor
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
The Maven error "Failed to read artifact descriptor" means Maven could not download or parse the POM file for a dependency. The fix depends on the root cause: a corrupted local cache, wrong dependency coordinates, network or proxy problems, or a misconfigured repository. In most cases, purging the local repository entry for the failing artifact and re-running the build resolves it immediately.
What the Error Actually Means
When Maven resolves a dependency, it first downloads the artifact's POM file (the descriptor) from a remote repository, then uses that POM to resolve transitive dependencies. The "Failed to read artifact descriptor" error fires when Maven either cannot fetch this POM or cannot parse it after downloading.
A typical stack trace looks like this:
The last line is the actual cause. In this example it is a network timeout, but the cause varies.
Root Causes and Targeted Fixes
1. Corrupted Local Repository Cache
Maven caches everything it downloads under ~/.m2/repository. If a previous download was interrupted, the cached POM may be truncated or contain an HTTP error page instead of XML. Maven will keep trying to read the corrupted file instead of re-downloading.
For a broader cleanup:
2. Wrong Dependency Coordinates
A typo in groupId, artifactId, or version causes Maven to look for an artifact that does not exist. Maven treats "not found" the same as "failed to read."
Verify coordinates by searching on Maven Central before assuming a network issue.
3. Network or Proxy Problems
If your machine cannot reach the remote repository, Maven cannot download the descriptor. This shows up as connection timeouts or SSL handshake failures.
4. Missing or Misconfigured Repository
If the artifact lives in a private or third-party repository (not Maven Central), that repository must be declared in the POM or settings.xml.
A mirrorOf set to * redirects all repository requests through the mirror. If that mirror is down or misconfigured, every artifact resolution will fail.
5. Maven _remote.repositories Marker Files
Maven creates .lastUpdated and _remote.repositories marker files in the local cache. Sometimes these markers tell Maven "this artifact does not exist on any repository," preventing it from re-trying the download even after the underlying issue is fixed.
Then re-run the build. Maven will attempt a fresh download.
Diagnostic Commands
Before trying fixes at random, run these commands to understand what Maven is actually doing:
Troubleshooting Decision Table
| Symptom | Most Likely Cause | Fix |
| "Connection timed out" in the error | Network or proxy issue | Check connectivity; configure proxy |
| Error persists after network is confirmed | Corrupted local cache | Delete the artifact folder under ~/.m2/repository |
| Artifact not found on Maven Central | Wrong coordinates or private repo | Verify groupId/artifactId/version; add repository declaration |
Error appeared after changing settings.xml | Mirror or repository misconfiguration | Check mirrorOf and repository URLs |
| Build worked yesterday, fails today | .lastUpdated marker blocking retry | Delete marker files for the artifact |
| Error only in CI, not locally | Different settings.xml or network rules | Compare CI and local settings.xml; check CI proxy |
Common Pitfalls
- Running
mvn dependency:purge-local-repositorywithout the-DactTransitively=falseflag. By default it also purges transitive dependencies, which can be slow and unnecessary. - Ignoring the actual error message at the bottom of the stack trace. The "Failed to read artifact descriptor" line is the symptom; the cause is always further down (timeout, 404, SSL error, parse error).
- Adding random repositories to the POM hoping one will have the artifact. Each additional repository slows builds and can introduce security risks.
- Forgetting that Maven caches "not found" results. If you fixed the underlying issue (added a repository, fixed coordinates), you still need to delete the
.lastUpdatedfiles or the cached entry. - Using
-U(force update snapshots) and assuming it also re-downloads corrupted release artifacts. The-Uflag only affects SNAPSHOT metadata.
Summary
- "Failed to read artifact descriptor" is a symptom, not a root cause. Always read the full error message to identify the actual failure (network, 404, corruption, parse error).
- The most common fix is deleting the corrupted local cache entry under
~/.m2/repositoryand re-running the build. - Verify dependency coordinates against Maven Central before investigating network issues.
- For proxy or mirror problems, inspect
settings.xmland test connectivity withcurl. - Use
mvn clean install -Xfor detailed diagnostic output, andmvn dependency:treeto understand where the failing artifact is required.

