quarkusio/quarkus · error · BootstrapMavenException
Failed to resolve artifacts
Error message
Failed to resolve artifacts
What it means
MavenArtifactResolver.resolve(List<ArtifactRequest>) resolves multiple artifacts in one Aether resolveArtifacts call. If any request in the batch fails, Aether throws ArtifactResolutionException and this wrapper 'Failed to resolve artifacts' is thrown; the cause's getResults() identifies which specific artifacts failed.
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/MavenArtifactResolver.java:176
}
private ArtifactResult resolveInternal(Artifact artifact, List<RemoteRepository> aggregatedRepos)
throws BootstrapMavenException {
try {
return repoSystem.resolveArtifact(repoSession,
new ArtifactRequest()
.setArtifact(artifact)
.setRepositories(aggregatedRepos));
} catch (ArtifactResolutionException e) {
throw new BootstrapMavenException("Failed to resolve artifact " + artifact, e);
}
}
public List<ArtifactResult> resolve(List<ArtifactRequest> artifacts) throws BootstrapMavenException {
try {
return repoSystem.resolveArtifacts(repoSession, artifacts);
} catch (ArtifactResolutionException e) {
throw new BootstrapMavenException("Failed to resolve artifacts", e);
}
}
public ArtifactDescriptorResult resolveDescriptor(final Artifact artifact)
throws BootstrapMavenException {
return resolveDescriptorInternal(artifact, remoteRepos);
}
public ArtifactDescriptorResult resolveDescriptor(final Artifact artifact, List<RemoteRepository> mainRepos)
throws BootstrapMavenException {
return resolveDescriptorInternal(artifact, aggregateRepositories(mainRepos, remoteRepos));
}
private ArtifactDescriptorResult resolveDescriptorInternal(final Artifact artifact, List<RemoteRepository> aggregatedRepos)
throws BootstrapMavenException {
try {
return repoSystem.readArtifactDescriptor(repoSession,
new ArtifactDescriptorRequest()View on GitHub (pinned to e1c734241f)
Solutions
- Inspect the cause (ArtifactResolutionException.getResults()) to find the failing artifact(s) and fix those coordinates
- Run artifacts through resolve one-by-one to isolate the offender
- Ensure every needed repository is configured for the session (bootstrap Maven context repos)
- Retry after fixing network/proxy or after the artifact is published
Example fix
// before
catch (BootstrapMavenException e) { log.error(e.getMessage()); }
// after
catch (BootstrapMavenException e) {
if (e.getCause() instanceof ArtifactResolutionException are) {
are.getResults().stream().filter(r -> !r.isResolved())
.forEach(r -> log.error("Missing: " + r.getRequest().getArtifact()));
}
} Defensive patterns
Strategy: try-catch
Validate before calling
for (ArtifactRequest req : requests) {
// cheap existence pre-check in local repo
if (!localArtifactExists(req.getArtifact())) pending.add(req);
}
if (pending.isEmpty()) return; // skip batch entirely Try / catch
try {
List<ArtifactResult> results = resolver.resolve(requests);
} catch (BootstrapMavenException e) {
if (e.getCause() instanceof ArtifactResolutionException are)
are.getResults().stream()
.filter(r -> !r.isResolved())
.forEach(r -> reportMissing(r.getRequest().getArtifact()));
} Prevention
- Split large batches so one bad coordinate doesn't fail everything (retry individually on failure)
- Keep a curated, verified list of artifact coordinates
- Log artifact-request contents before batch resolution for diagnosis
- Ensure session repositories cover every vendor of the requested artifacts
When it happens
Trigger: Calling resolve(List<ArtifactRequest>) where at least one requested artifact cannot be resolved from local repo or the aggregated remote repositories (missing artifact, offline, broken repo).
Common situations: Batch dependency downloads in tooling (Quarkus code generation, dev mode class loading) where a single bad version in a list fails the whole batch; mixed valid/invalid coordinates; one unreachable repository slowing/failing the batch.
Related errors
- Failed to resolve artifact ${artifact}
- Failed to resolve
- Failed to resolve artifact ${artifact}
- Failed to resolve reference artifact ${groupId}:${artifactId
- Artifact file not found for ${artifact}
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/42cbea2e08db3626.
Report an issue: GitHub.