quarkusio/quarkus · error · MojoExecutionException
Failed to obtain descriptor for Maven plugin
Error message
Failed to obtain descriptor for Maven plugin <pluginId> goal <goal>
What it means
DevMojo fetches a plugin's MojoDescriptor via pluginManager.getMojoDescriptor to determine how to invoke a goal (e.g. when restarting after POM changes). Failure to resolve the plugin or its goal descriptor is wrapped in MojoExecutionException with the plugin id and goal name.
Solutions
- Verify the goal name and plugin coordinates in the configuration are correct.
- Run with -U / check repository access so the plugin jar and its descriptor can be downloaded.
- Pin a published, existing version of the plugin in pom.xml or pluginManagement.
- Ensure internal repositories hosting the plugin are reachable and configured in settings.xml.
Example fix
// before mvn quarkus:dev -Dquarkus.run-goals=org.acme:weird-plugin:1.0.0:not-a-goal // after mvn quarkus:dev -Dquarkus.run-goals=org.acme:weird-plugin:1.0.0:my-goal
Defensive patterns
Strategy: validation
Validate before calling
// confirm the plugin/goal exists before invoking mvn org.acme:my-plugin:1.0.0:help -Dgoal=my-goal -N
Prevention
- Double-check plugin groupId:artifactId:version:goal coordinates.
- Ensure all repositories hosting custom plugins are configured in settings.xml.
- Pin plugin versions that are actually published.
- Avoid -o offline mode when the plugin is not yet cached.
When it happens
Trigger: Invoking a Maven goal through dev mode where the plugin cannot be resolved: unknown goal name, plugin artifact not downloadable, wrong groupId:artifactId in build configuration, or repository/network failure while fetching the plugin.
Common situations: Typos in goal names in run/goal configuration; custom plugin deployed only to an internal repository that is unreachable; plugin version pinned in pom.xml is not published; offline mode prevents downloading the plugin.
Related errors
- Dev mode process did not complete successfully
- Failed to locate io.quarkus:quarkus-core-deployment on the…
- Failed to run
- Hot reloadable dependency
- Local dependency does not appear to have any sources
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/d2e4db9c5a505f82.
Report an issue: GitHub.
Appendix: source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java:1128
* <li>both equals (ignoring case)</li>
* </ul>
*
* @param currentExecutionId current execution id (if defined)
* @param executionId execution id to test matching (if defined)
* @return <code>true</code> if executions ids do match.
*/
private static boolean matchesExecution(String currentExecutionId, String executionId) {
if (currentExecutionId == null) {
return true;
}
return executionId == null || currentExecutionId.equalsIgnoreCase(executionId);
}
private MojoDescriptor getMojoDescriptor(Plugin plugin, String goal) throws MojoExecutionException {
try {
return pluginManager.getMojoDescriptor(plugin, goal, pluginRepos, repoSession);
} catch (Exception e) {
throw new MojoExecutionException(
"Failed to obtain descriptor for Maven plugin " + plugin.getId() + " goal " + goal, e);
}
}
private Plugin getConfiguredPluginOrNull(String groupId, String artifactId) {
if (pluginMap == null) {
pluginMap = new HashMap<>();
// the original plugin keys may include property expressions, so we can't rely on the exact groupId:artifactId keys
for (Plugin p : project.getBuildPlugins()) {
pluginMap.put(ArtifactKey.ga(p.getGroupId(), p.getArtifactId()), p);
}
}
return pluginMap.get(ArtifactKey.ga(groupId, artifactId));
}
private Map<Path, Long> readPomFileTimestamps(DevModeRunner runner) throws IOException {
Map<Path, Long> ret = new HashMap<>();
for (Path i : runner.pomFiles()) {View on GitHub (pinned to e1c734241f)