quarkusio/quarkus · error · MojoExecutionException
Failed to read descriptor of ${projectArtifact}
Error message
Failed to read descriptor of ${projectArtifact} What it means
The mojo reads the Maven artifact descriptor (POM metadata) of the project artifact via repoSystem.readArtifactDescriptor. An ArtifactDescriptorException is wrapped as 'Failed to read descriptor of <artifact>'.
Source
Thrown at independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java:1211
}
private CollectRequest newCollectRuntimeDepsRequest() throws MojoExecutionException {
return newCollectRequest(new DefaultArtifact(project.getArtifact().getGroupId(),
project.getArtifact().getArtifactId(),
project.getArtifact().getClassifier(),
project.getArtifact().getArtifactHandler().getExtension(),
project.getArtifact().getVersion()));
}
private CollectRequest newCollectRequest(DefaultArtifact projectArtifact) throws MojoExecutionException {
final ArtifactDescriptorResult projectDescr;
try {
projectDescr = repoSystem.readArtifactDescriptor(repoSession,
new ArtifactDescriptorRequest()
.setArtifact(projectArtifact)
.setRepositories(repos));
} catch (ArtifactDescriptorException e) {
throw new MojoExecutionException("Failed to read descriptor of " + projectArtifact, e);
}
final CollectRequest request = new CollectRequest().setRootArtifact(projectArtifact)
.setRepositories(repos)
.setManagedDependencies(projectDescr.getManagedDependencies());
for (Dependency dep : projectDescr.getDependencies()) {
if ("test".equals(dep.getScope())
|| "provided".equals(dep.getScope())
|| dep.isOptional()) {
continue;
}
request.addDependency(dep);
}
return request;
}
private boolean isJarFile(final File f) {
return f != null && f.getName().endsWith(".jar") && f.exists() && !f.isDirectory();View on GitHub (pinned to e1c734241f)
Solutions
- Validate the project pom: mvn validate and mvn help:effective-pom
- Ensure parent POMs are resolvable (install local parents or fix repository config)
- Clear corrupted metadata: delete the artifact dir in ~/.m2/repository and rebuild
- Check the wrapped cause for the specific unresolvable parent or model problem
Example fix
<!-- before: broken parent reference --> <parent> <groupId>x</groupId> <artifactId>nonexistent-parent</artifactId> <version>1.0</version> </parent> <!-- after: point to an installed/resolvable parent --> <parent> <groupId>x</groupId> <artifactId>existing-parent</artifactId> <version>1.0</version> </parent>
Defensive patterns
Strategy: validation
Validate before calling
mvn validate && mvn help:effective-pom -q
Try / catch
try {
mojo.execute();
} catch (MojoExecutionException e) {
if (e.getMessage().startsWith("Failed to read descriptor of")) {
// fix pom/parent resolution before retrying
}
} Prevention
- Validate poms in CI before descriptor generation
- Ensure parent poms installed/resolvable
- Keep local repo clean of corrupted metadata
When it happens
Trigger: readArtifactDescriptor fails because the project artifact's POM cannot be resolved or parsed — invalid pom, unavailable parent pom, or repository access errors.
Common situations: Broken parent POM resolution; invalid XML in a generated pom; missing repositories for parent imports; corrupted metadata in local repo.
Related errors
- Failed to read descriptor of ${artifact}
- Failed to read descriptor of ${artifact}
- 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/0e41f8672a8e2b1d.
Report an issue: GitHub.