quarkusio/quarkus · error · MojoExecutionException
Resolution of annotationProcessorPath dependencies failed: <
Error message
Resolution of annotationProcessorPath dependencies failed: <message>
What it means
DevMojo resolves the project's annotationProcessorPaths so generated sources are visible in dev mode. If the Aether dependency resolution of those processor artifacts fails, it throws MojoExecutionException with this message and the resolver's localized error message. This typically means a compiler-plugin annotation processor dependency cannot be resolved.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java:948
}
var versionConstraints = getAnnotationProcessorPathsDepMgmt(pluginConfig);
Xpp3Dom[] paths = annotationProcessorPaths.getChildren("path");
Set<File> elements = new LinkedHashSet<>();
try {
List<org.eclipse.aether.graph.Dependency> dependencies = convertToDependencies(paths);
CollectRequest collectRequest = new CollectRequest(dependencies, versionConstraints,
project.getRemoteProjectRepositories());
DependencyRequest dependencyRequest = new DependencyRequest();
dependencyRequest.setCollectRequest(collectRequest);
DependencyResult dependencyResult = repoSystem.resolveDependencies(session.getRepositorySession(),
dependencyRequest);
for (ArtifactResult resolved : dependencyResult.getArtifactResults()) {
elements.add(resolved.getArtifact().getFile());
}
return elements;
} catch (Exception e) {
throw new MojoExecutionException(
"Resolution of annotationProcessorPath dependencies failed: " + e.getLocalizedMessage(), e);
}
}
private List<org.eclipse.aether.graph.Dependency> getAnnotationProcessorPathsDepMgmt(Xpp3Dom pluginConfig) {
final Xpp3Dom useDepMgmt = pluginConfig.getChild("annotationProcessorPathsUseDepMgmt");
if (useDepMgmt == null || !Boolean.parseBoolean(useDepMgmt.getValue())) {
return List.of();
}
var dm = project.getDependencyManagement();
if (dm == null) {
return List.of();
}
return getProjectAetherDependencyManagement();
}
private List<org.eclipse.aether.graph.Dependency> convertToDependencies(Xpp3Dom[] paths) throws MojoExecutionException {
List<org.eclipse.aether.graph.Dependency> dependencies = new ArrayList<>();View on GitHub (pinned to e1c734241f)
Solutions
- Add explicit <version> to each annotationProcessorPath entry, or set annotationProcessorPathsUseDepMgmt=true to inherit versions from dependencyManagement.
- Run with -U to refresh stale metadata and delete corrupt ~/.m2/repository entries for the failing processor.
- Verify the processor artifact/version exists in the configured repositories (check network/proxy/credentials).
- Read the chained message for the exact unresolvable artifact and fix its coordinates.
Example fix
// before <annotationProcessorPath> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </annotationProcessorPath> // after <annotationProcessorPath> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.34</version> </annotationProcessorPath>
Defensive patterns
Strategy: validation
Validate before calling
// ensure each annotationProcessorPath has a resolvable version // pre-flight resolve check mvn dependency:resolve -DincludeArtifactIds=lombok,mapstruct-processor -U
Prevention
- Declare explicit versions for every annotationProcessorPath.
- Set annotationProcessorPathsUseDepMgmt=true when versions come from dependencyManagement.
- Keep processor artifacts in reachable repositories.
- Clean corrupt ~/.m2 entries when resolution fails oddly.
When it happens
Trigger: Configuring maven-compiler-plugin annotationProcessorPaths with an artifact that is missing from repositories, has no version (and dep management not enabled), or is unresolvable offline; corrupt local cache entry for the processor.
Common situations: Lombok/MapStruct/QueryDSL processor declared with a version absent from the repo; annotationProcessorPathsUseDepMgmt not enabled while versions come from dependencyManagement; proxy blocking download; snapshot processor no longer published.
Related errors
- Unable to parse pom file: ${pom}
- Could not resolve POM for
- Failed to resolve application model <appArtifact> dependenci
- Either @ConfigRoot or @ConfigMapping is missing on ${configR
- Error on %s: Configuration classes with ConfigPhase.RUN_TIME
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/59c4c420a2cc495a.
Report an issue: GitHub.