quarkusio/quarkus · error · BootstrapMavenException
Failed to read descriptor of ${artifact}
Error message
Failed to read descriptor of ${artifact} What it means
resolveDescriptor reads an artifact's POM descriptor via the Maven Resolver. If ArtifactDescriptorException is thrown (POM unreadable, unresolvable parents, invalid model), it is wrapped as BootstrapMavenException "Failed to read descriptor of <artifact>".
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/BootstrapAppModelResolver.java:630
try {
return mvn.getSystem().resolveArtifact(mvn.getSession(),
new ArtifactRequest()
.setArtifact(artifact)
.setRepositories(aggregatedRepos));
} catch (ArtifactResolutionException e) {
throw new BootstrapMavenException("Failed to resolve artifact " + artifact, e);
}
}
private ArtifactDescriptorResult resolveDescriptor(Artifact artifact, List<RemoteRepository> aggregatedRepos)
throws BootstrapMavenException {
try {
return mvn.getSystem().readArtifactDescriptor(mvn.getSession(),
new ArtifactDescriptorRequest()
.setArtifact(artifact)
.setRepositories(aggregatedRepos));
} catch (ArtifactDescriptorException e) {
throw new BootstrapMavenException("Failed to read descriptor of " + artifact, e);
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Delete the artifact's directory under ~/.m2/repository and re-resolve to repair a corrupt cached POM.
- Check the wrapped cause for an unresolvable parent POM and fix the parent's coordinates/availability.
- Verify the remote repository serving the POM is reachable and contains the correct version.
Example fix
// before rm nothing; keep corrupt cache // after rm -rf ~/.m2/repository/com/example/broken-artifact/1.0.0 && mvn -U quarkus:dev
Defensive patterns
Strategy: try-catch
Validate before calling
// Detect likely-corrupt cached POM before resolution:
Path pom = localRepo.resolve(groupId.replace('.', '/') + "/" + artifactId + "/" + version + "/"
+ artifactId + "-" + version + ".pom");
if (Files.exists(pom) && Files.size(pom) == 0) {
Files.delete(pom); // remove empty/corrupt POM
} Type guard
static boolean hasReadablePom(java.nio.file.Path localRepoPath, String gavPath) {
java.nio.file.Path p = localRepoPath.resolve(gavPath);
return java.nio.file.Files.isRegularFile(p) && p.toFile().length() > 0;
} Try / catch
try {
model = resolver.resolveModel(coords);
} catch (BootstrapMavenException e) {
if (e.getMessage().startsWith("Failed to read descriptor")) {
log.error("POM descriptor unreadable; clear the artifact from ~/.m2/repository and retry: " + e.getMessage(), e);
}
throw e;
} Prevention
- Treat zero-length POMs in ~/.m2/repository as corrupt and delete them.
- Keep parent POM versions available in configured repositories.
- Use -U to force refresh of stale metadata after upstream releases.
When it happens
Trigger: resolveDescriptor(Artifact, List<RemoteRepository>) (called from appArtifactDescr during doResolveModel) when readArtifactDescriptor fails — invalid/corrupt POM in the local repo, unresolvable parent POM, or a non-POM artifact where a descriptor is expected.
Common situations: Corrupted cached POM under ~/.m2/repository (partial download); parent POM version that no longer exists remotely; custom artifacts published without valid POMs.
Related errors
- Failed to read descriptor of ${artifact}
- Failed to read descriptor of ${projectArtifact}
- Unable to parse pom file: ${pom}
- Could not resolve POM for
- Unable to update the pom.xml file
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/64f58b45ec620b96.
Report an issue: GitHub.