quarkusio/quarkus · error · BootstrapMavenException
Failed to parse
Error message
Failed to parse
What it means
BootstrapMavenException from loadCurrentProjectModel: the current project's pom.xml could not be parsed by the Maven model reader. The path of the file that failed to parse follows the message prefix; the caused-by exception carries the XML/model error detail.
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/BootstrapMavenContext.java:810
public static RemoteRepository newDefaultRepository() {
return new RemoteRepository.Builder(DEFAULT_REMOTE_REPO_ID, "default", DEFAULT_REMOTE_REPO_URL)
.setReleasePolicy(new RepositoryPolicy(true, RepositoryPolicy.UPDATE_POLICY_DAILY,
RepositoryPolicy.CHECKSUM_POLICY_WARN))
.setSnapshotPolicy(new RepositoryPolicy(false, RepositoryPolicy.UPDATE_POLICY_DAILY,
RepositoryPolicy.CHECKSUM_POLICY_WARN))
.build();
}
private Model loadCurrentProjectModel() throws BootstrapMavenException {
final Path pom = getCurrentProjectPomOrNull();
if (pom == null) {
return null;
}
try {
return ModelUtils.readModel(pom);
} catch (IOException e) {
throw new BootstrapMavenException("Failed to parse " + pom, e);
}
}
private List<RemoteRepository> resolveRawProjectRepos(List<RemoteRepository> repos)
throws BootstrapMavenException {
final Artifact projectArtifact;
if (currentProject == null) {
final Model model = loadCurrentProjectModel();
if (model == null) {
return List.of();
}
projectArtifact = new DefaultArtifact(ModelUtils.getGroupId(model), model.getArtifactId(),
ArtifactCoords.DEFAULT_CLASSIFIER, ArtifactCoords.TYPE_POM, ModelUtils.getVersion(model));
} else {
projectArtifact = new DefaultArtifact(currentProject.getGroupId(), currentProject.getArtifactId(),
ArtifactCoords.DEFAULT_CLASSIFIER, ArtifactCoords.TYPE_POM, currentProject.getVersion());
}
View on GitHub (pinned to e1c734241f)
Solutions
- Fix the XML/model error reported by the caused-by exception in the named pom
- Ensure the pom is well-formed and declares a valid project model
- Check for unescaped characters or broken entity references in the pom
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/BootstrapMavenContext.java:810 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/28df651f47ed6e7a.
Report an issue: GitHub.