apache/maven · error · PluginResolutionException
Plugin {} or one of its dependencies could not be resolved:
Error message
Plugin {} or one of its dependencies could not be resolved:
{} What it means
Deprecated extension-resolution path in DefaultPluginDependenciesResolver: after reading the descriptor of a core/extension plugin (and warning about relocations), an ArtifactDescriptorException — failure to read the extension's POM — is converted to PluginResolutionException with the combined 'Plugin ... or one of its dependencies could not be resolved' message. Same failure family as the non-deprecated resolver, surfaced when building extension realms.
Source
Thrown at impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java:206
for (MavenPluginDependenciesValidator dependenciesValidator : dependenciesValidators) {
dependenciesValidator.validate(session, pluginArtifact, result);
}
pluginArtifact = result.getArtifact();
if (logger.isWarnEnabled() && !result.getRelocations().isEmpty()) {
String message =
pluginArtifact instanceof RelocatedArtifact relocated ? ": " + relocated.getMessage() : "";
logger.warn(
"The extension {} has been relocated to {}{}",
result.getRelocations().get(0),
pluginArtifact,
message);
}
return resolveInternal(plugin, pluginArtifact, dependencyFilter, repositories, session);
} catch (ArtifactDescriptorException e) {
throw new PluginResolutionException(plugin, e.getResult().getExceptions(), e);
}
}
@Deprecated
@Override
public DependencyResult resolvePlugin(
Plugin plugin,
Artifact artifact,
DependencyFilter dependencyFilter,
List<RemoteRepository> repositories,
RepositorySystemSession session)
throws PluginResolutionException {
return resolvePluginAndFlatten(plugin, artifact, dependencyFilter, repositories, session);
}
@Override
public DependencyResult resolvePluginAndFlatten(
Plugin plugin,View on GitHub (pinned to e4093d4e12)
Solutions
- Check the extension plugin's POM is deployed and readable in a reachable repository.
- Fix the coordinates/version to one that is fully deployed (POM plus JAR plus parent chain).
- Purge the local cache for that group and re-run with mvn -U.
- Ensure mirrors expose the repository hosting the extension's parent POM.
- If the extension is yours, run mvn deploy on a clean repo and verify the full file set landed.
Example fix
# before: extension POM unreadable (missing parent) while building the extension realm # after: verify deployment completeness, then force refresh curl -fsSI https://repo.example.com/org/example/example-build-extension/2.0/example-build-extension-2.0.pom rm -rf ~/.m2/repository/org/example/example-build-extension mvn -U verify
Defensive patterns
Strategy: validation
Validate before calling
# validate the extension's full descriptor chain before the build consumes it repo=https://repo.example.com for f in example-build-extension-2.0.pom example-build-extension-2.0.jar; do curl -fsSI $repo/org/example/example-build-extension/2.0/$f > /dev/null || echo "MISSING: $f" done # parent POM referenced by the extension must also resolve curl -fsSI $repo/org/example/example-parent/1.3/example-parent-1.3.pom > /dev/null || echo 'MISSING parent POM'
Try / catch
try {
pluginDependenciesResolver.resolveExtension(plugin, repositories, session); // deprecated API
} catch (PluginResolutionException e) {
if (e.getCause() instanceof ArtifactDescriptorException ade) {
reportDescriptorFailure(plugin, ade.getResult().getExceptions());
}
throw e;
} Prevention
- Keep extension plugins on released versions with complete deployments.
- Avoid hand-editing repository paths for extensions; let the repo manager proxy the source repo.
- Purge ~/.m2/repository entries for an extension after fixing upstream, then rebuild with -U.
- Track deprecation: migrate off the resolvePlugin/resolveExtension APIs when updating embedder code.
When it happens
Trigger: Resolving a <extensions>true</extensions> plugin (or deprecated resolvePlugin/resolveExtension API) whose POM cannot be read: missing POM, invalid XML, unresolvable parent, or transfer failure from the configured repositories.
Common situations: Custom packaging/build extensions whose POM is missing from the corporate repository; extensions whose parent POM lives in a repo not proxied by the mirror; local repo corruption.
Related errors
- Plugin ${plugin.getId()} or one of its dependencies could no
- Could not find the selected project in the reactor: {}
- A required class was missing while executing {}: {}
- An API incompatibility was encountered while executing ${moj
- A type incompatibility occurred while executing ${mojoDescri
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/9f465dc29d21a5e8.
Report an issue: GitHub.