Maven "Failed to read artifact descriptor for" error: causes and fixes
Codemia Knowledge Hub ·
"Failed to read artifact descriptor" means Maven could not download or parse the POM file of a dependency. The cause is usually a corrupted local cache, wrong dependency coordinates, a network or proxy problem, or a misconfigured repository. Most of the time, deleting the failing artifact from the local repository and re-running the build fixes it.
What the artifact descriptor is
To resolve a dependency, Maven first downloads the artifact's POM file (its descriptor) from a remote repository and uses it to resolve transitive dependencies. The error fires when Maven cannot fetch that POM or cannot parse it.
A typical stack trace:
The last line is the real cause. Here it is a network timeout, but it varies.
Causes and fixes
1. Corrupted local repository cache
Maven caches downloads under ~/.m2/repository. If a download was interrupted, the cached POM may be truncated or contain an HTTP error page instead of XML, and Maven keeps reading the bad file instead of re-downloading.
For a broader cleanup:
2. Wrong dependency coordinates
A typo in groupId, artifactId or version sends Maven looking for an artifact that does not exist, and Maven reports "not found" as "failed to read."
Check coordinates on Maven Central before assuming a network problem.
3. Network or proxy problems
If your machine cannot reach the remote repository, Maven cannot download the descriptor. Expect connection timeouts or SSL handshake failures.
4. Missing or misconfigured repository
An artifact hosted in a private or third-party repository (not Maven Central) needs that repository declared in the POM or settings.xml.
mirrorOf set to * routes every repository request through the mirror. If the mirror is down or misconfigured, every artifact resolution fails.
5. Stale marker files in the local cache
Maven writes .lastUpdated and _remote.repositories marker files into the local cache. These can tell Maven "this artifact does not exist on any repository" and stop it from retrying even after you fix the real issue.
Re-run the build and Maven attempts a fresh download.
Diagnostic commands
Before trying fixes at random, see what Maven is actually doing:
Symptom to fix 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 |
Mistakes that keep the error around
- Running
mvn dependency:purge-local-repositorywithout-DactTransitively=false. By default it also purges transitive dependencies, which is slow and usually unnecessary. - Ignoring the bottom of the stack trace. "Failed to read artifact descriptor" is the symptom; the cause (timeout, 404, SSL error, parse error) is always further down.
- Adding random repositories to the POM hoping one has the artifact. Each one slows builds and can introduce security risks.
- Forgetting that Maven caches "not found" results. After fixing the real issue (adding a repository, correcting coordinates), you still need to delete the
.lastUpdatedfiles or the cached entry. - Expecting
-U(force update snapshots) to re-download corrupted release artifacts. It only affects SNAPSHOT metadata.
Related reading
- Maven is not using Java 11 error message Fatal error compiling invalid target release 11
- Maven is not working in Java 8 when Javadoc tags are incomplete
- Maven module using spring-boot
- Maven Modules + Building a Single Specific Module
- Maven package/install without test (skip tests)
- Maven Plugin not found in IntelliJ IDE
- Maven parent pom vs modules pom
- Maven plugin for versioning and minifying javascript
System design interview problems on this topic
- Design an API Rate Limiter: solution and walkthrough
- Design a Distributed Messaging System: solution and walkthrough
- Design an Online Payment Service: solution and walkthrough
- Design a Key Value Store: solution and walkthrough

OOD Fundamentals
Master object-oriented design from first principles, SOLID, design patterns, and classic interview problems with hands-on coding.
View the courseData Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.