quarkusio/quarkus · error · BootstrapMavenException
Failed to resolve artifact ${artifact}
Error message
Failed to resolve artifact ${artifact} What it means
MavenArtifactResolver.resolve(Artifact) resolves a single Maven artifact through the Eclipse Aether RepositorySystem (resolveArtifact) against the aggregated remote repositories. If Aether throws ArtifactResolutionException (artifact not found in any repo, repo unreachable, checksum failure), it is wrapped in BootstrapMavenException 'Failed to resolve artifact <gav>'.
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/MavenArtifactResolver.java:168
}
public ArtifactResult resolve(Artifact artifact) throws BootstrapMavenException {
return resolveInternal(artifact, remoteRepos);
}
public ArtifactResult resolve(Artifact artifact, List<RemoteRepository> mainRepos) throws BootstrapMavenException {
return resolveInternal(artifact, aggregateRepositories(mainRepos, remoteRepos));
}
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 {View on GitHub (pinned to e1c734241f)
Solutions
- Read the wrapped ArtifactResolutionException cause for the missing artifact and attempted repositories
- Verify the coordinates (groupId:artifactId:version:classifier:extension) exist on Maven Central or the configured repos
- Add the required <repository> to settings.xml or the project so the artifact's host repo is aggregated
- Check network/proxy settings (settings.xml proxies, HTTPs, firewall) if repos are unreachable
Example fix
// before
resolver.resolve(new DefaultArtifact("com.example", "foo", "jar", "1.2.3")); // wrong signature order
// after
resolver.resolve(new DefaultArtifact("com.example", "foo", null, "jar", "1.2.3")); // classifier=null Defensive patterns
Strategy: try-catch
Validate before calling
// verify coordinates exist before calling
VersionRangeResult r = resolver.resolveVersionRange(
new DefaultArtifact(g, a, null, ext, "[0,)"));
if (r.getHighestVersion() == null) throw new IllegalArgumentException("Unknown artifact " + g + ":" + a); Try / catch
try {
ArtifactResult res = resolver.resolve(artifact);
} catch (BootstrapMavenException e) {
if (e.getCause() instanceof ArtifactResolutionException are) {
for (Exception ex : are.getResults().get(0).getExceptions())
log.error("Repo failure: " + ex.getMessage());
}
throw new IllegalStateException("Cannot resolve " + artifact, e);
} Prevention
- Validate GAV coordinates against search.maven.org before resolving
- Configure all required repositories (including internal Nexus/Artifactory) up front
- Set proper proxy settings in settings.xml for corporate networks
- Prefer explicit released versions over LATEST/moving versions
When it happens
Trigger: Calling MavenArtifactResolver.resolve(Artifact) for a GAV that does not exist in local or any configured remote repository; remote repositories unreachable; wrong classifier/extension in the artifact coordinates.
Common situations: Typo in artifact coordinates or version not published (e.g. using a version only in a repo not configured); corporate proxy/firewall blocking repo.apache.org or Maven Central; missing repository declarations for a third-party artifact; SNAPSHOT that was purged.
Related errors
- Failed to resolve artifact ${artifact}
- Failed to resolve
- Failed to resolve extension ${coords}
- Failed to resolve artifact: ${gav}
- Failed to initialize Maven artifact resolver
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/cf61aca8b096149f.
Report an issue: GitHub.