quarkusio/quarkus · error · IllegalStateException
Unknown plugin type!
Error message
Unknown plugin type!
What it means
PluginCommandFactory.createPluginCommand hits this IllegalStateException when a Quarkus CLI plugin descriptor has a PluginType that the factory's switch does not handle (the default branch). It indicates the plugin metadata declares a type outside the known set (e.g. jar/jbang vs. other supported kinds).
Source
Thrown at devtools/cli/src/main/java/io/quarkus/cli/plugin/PluginCommandFactory.java:50
private Optional<PluginCommand> createPluginCommand(Plugin plugin) {
switch (plugin.getType()) {
case maven:
return plugin.getLocation().flatMap(PluginUtil::checkGACTV).map(g -> new JBangCommand(toGAVC(g), output));
case java:
case jar:
case jbang:
return plugin.getLocation().map(l -> new JBangCommand(l, output));
case executable:
return plugin.getLocation().map(l -> new ShellCommand(plugin.getName(), Paths.get(l), output));
case extension:
if (PluginUtil.checkGACTV(plugin.getLocation()).isPresent()) {
return plugin.getLocation().flatMap(PluginUtil::checkGACTV).map(g -> new JBangCommand(toGAVC(g), output));
} else if (plugin.getLocation().filter(l -> l.endsWith(".jar")).isPresent()) {
return plugin.getLocation().map(l -> new JBangCommand(l, output));
}
default:
throw new IllegalStateException("Unknown plugin type!");
}
}
/**
* Create a command for the specified plugin
*/
public Optional<CommandSpec> createCommand(Plugin plugin) {
return createPluginCommand(plugin).map(createCommandSpec(plugin.getDescription().orElse("")));
}
public Function<PluginCommand, CommandSpec> createCommandSpec(String description) {
return command -> {
CommandSpec spec = CommandSpec.wrapWithoutInspection(command);
if (!StringUtil.isNullOrEmpty(description)) {
spec.usageMessage().description(description);
}
spec.parser().unmatchedArgumentsAllowed(true);
spec.parser().unmatchedOptionsArePositionalParams(true);View on GitHub (pinned to e1c734241f)
Solutions
- Check the plugin descriptor YAML in ~/.quarkus/cli/plugins and set `type:` to a supported value (e.g. jar or jbang).
- Remove the broken plugin entry (`quarkus plugin remove <name>` or delete its YAML) and reinstall it.
- Upgrade the Quarkus CLI to match the version that wrote the plugin descriptor.
Example fix
# before (~/.quarkus/cli/plugins/foo.yaml) type: maven # after type: jar
Defensive patterns
Strategy: try-catch
Validate before calling
// inspect descriptor before install type: $(yq '.type' ~/.quarkus/cli/plugins/<name>.yaml) if [ "$type" != "jar" ] && [ "$type" != "jbang" ]; then echo "Unsupported plugin type: $type"; exit 1; fi
Type guard
public static boolean isKnownPluginType(Plugin p) {
return p.getType() == PluginType.JAR || p.getType() == PluginType.JBANG;
} Try / catch
try {
Command cmd = factory.createPluginCommand(plugin, output);
} catch (IllegalStateException e) {
if (e.getMessage().contains("Unknown plugin type")) {
log.error("Plugin %s has an unsupported type; reinstall or upgrade the CLI".formatted(plugin.getName()));
} else throw e;
} Prevention
- Keep the Quarkus CLI and plugins at compatible versions.
- Do not hand-edit plugin descriptor YAMLs.
- After upgrades, run `quarkus plugin list` to detect stale entries.
- Reinstall plugins whose type field looks unfamiliar.
When it happens
Trigger: Installing or invoking a CLI plugin whose descriptor (plugin YAML in ~/.quarkus/cli/plugins) specifies a plugin type the current CLI version cannot dispatch, so the switch falls through to `default: throw new IllegalStateException("Unknown plugin type!")`.
Common situations: A plugin created by a newer Quarkus CLI version introducing a new type; a hand-edited or corrupted plugin YAML with a mistyped `type:` field; leftover plugin descriptors after an upgrade/downgrade.
Related errors
- More than one @QuarkusMain method found with name '${name}':
- Build metrics file cannot be read:
- Build report file cannot be written to:
- The specified %s identifier (%s) contains invalid characters
- Algorithm not supported:
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/22cbe2ef7f165125.
Report an issue: GitHub.