quarkusio/quarkus · error · RuntimeException
Failed to resolve
Error message
Failed to resolve
What it means
Thrown when the underlying Maven resolver cannot download/locate the POM artifact for the requested coordinates (ArtifactCoords). The coordinates are appended to the message and the original BootstrapMavenException is the cause.
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/DefaultEffectiveModelResolver.java:77
}
final LocalWorkspace ws = resolver.getMavenContext().getWorkspace();
if (ws != null) {
final LocalProject project = ws.getProject(coords.getGroupId(), coords.getArtifactId());
if (project != null && coords.getVersion().equals(project.getVersion())
&& project.getEffectiveModel() != null) {
return project.getEffectiveModel();
}
}
final File pomFile;
final ArtifactResult pomResult;
try {
pomResult = resolver.resolve(new DefaultArtifact(coords.getGroupId(), coords.getArtifactId(),
coords.getClassifier(), coords.getType(), coords.getVersion()), repos);
pomFile = pomResult.getArtifact().getFile();
} catch (BootstrapMavenException e) {
throw new RuntimeException("Failed to resolve " + coords.toCompactCoords(), e);
}
final Model rawModel;
try {
rawModel = ModelUtils.readModel(pomFile.toPath());
} catch (IOException e1) {
throw new RuntimeException("Failed to read " + pomFile, e1);
}
final ModelResolver modelResolver;
try {
modelResolver = BootstrapModelResolver.newInstance(resolver.getMavenContext(), null);
} catch (BootstrapMavenException e) {
throw new RuntimeException("Failed to initialize model resolver", e);
}
// override the relative path to the parent in case it's in the local Maven repo
Parent parent = rawModel.getParent();View on GitHub (pinned to e1c734241f)
Solutions
- Verify the coordinates (groupId:artifactId:version) actually exist — check with 'mvn dependency:get -Dartifact=g:a:v'
- Add the required repository (and credentials in settings.xml) to the resolver configuration
- Check network/proxy/VPN connectivity and proxy settings in settings.xml
- Clear a corrupt cached entry in ~/.m2/repository for that artifact and retry
Example fix
// before
resolver.resolve(new DefaultArtifact("com.acme", "missing-app", null, "jar", "1.0.0"), repos);
// after: correct coordinates + repository
repos = List.of(new RemoteRepository.Builder("acme", "default", "https://repo.acme.com/maven2").build());
resolver.resolve(new DefaultArtifact("com.acme", "missing-app", null, "jar", "1.0.1"), repos); Defensive patterns
Strategy: try-catch
Validate before calling
// probe artifact existence first
try {
resolver.resolve(new DefaultArtifact(g, a, c, type, v), repos);
} catch (BootstrapMavenException e) {
throw new IllegalStateException("Artifact " + g + ":" + a + ":" + v + " unavailable; check repos/credentials", e);
} Try / catch
try {
Model m = modelResolver.resolveEffectiveModel(coords);
} catch (RuntimeException e) {
if (e.getCause() instanceof BootstrapMavenException) {
logger.error("Cannot resolve " + coords.toCompactCoords() + ": verify coordinates, repositories, network", e);
}
throw e;
} Prevention
- Verify coordinates with mvn dependency:get before programmatic resolution
- Configure all required repositories and credentials in settings.xml
- Check proxy/VPN settings when resolving from private repos
When it happens
Trigger: resolveEffectiveModel(ArtifactCoords, repos) calling resolver.resolve(DefaultArtifact...) when the artifact does not exist in any configured repository, credentials are wrong, or the network is unavailable.
Common situations: Typo'd groupId/artifactId/version, artifact only in a private repo that isn't configured, missing repository credentials in settings.xml, offline/VPN issues, snapshot artifacts purged from remote.
Related errors
- Failed to resolve artifact ${artifact}
- Failed to resolve artifact ${artifact}
- 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/a002c777a43509ad.
Report an issue: GitHub.