quarkusio/quarkus · error · IllegalArgumentException
Either extension-catalogs-included or mavenConfig/repository
Error message
Either extension-catalogs-included or mavenConfig/repository configuration can be enabled at the same time
What it means
Thrown when a registry's local configuration enables both `extension-catalogs-included: true` and a `maven.repository` block. These are mutually exclusive: including extension catalogs means extensions come with the registry metadata, while a custom maven repository layout takes over extension resolution, so both cannot apply at once.
Source
Thrown at independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/client/maven/MavenRegistryClientFactory.java:312
? remote.getRecognizedVersionsExpression()
: local.getRecognizedVersionsExpression());
return complete;
}
private static RegistryPlatformsConfig completeRegistryPlatformConfig(RegistryPlatformsConfig local,
RegistryPlatformsConfig remote) {
if (local == null) {
return remote;
}
if (isPlatformsConfigComplete(local, remote)) {
return local;
}
Boolean extensionCatalogsIncluded = local.getExtensionCatalogsIncluded();
RegistryMavenConfig mavenConfig = null;
if (local.getMaven() != null && local.getMaven().getRepository() != null) {
if (extensionCatalogsIncluded != null && extensionCatalogsIncluded) {
throw new IllegalArgumentException(
"Either extension-catalogs-included or mavenConfig/repository configuration can be enabled at the same time");
}
mavenConfig = local.getMaven();
}
if (mavenConfig == null) {
if (extensionCatalogsIncluded == null || !extensionCatalogsIncluded) {
if (extensionCatalogsIncluded == null) {
extensionCatalogsIncluded = remote.getExtensionCatalogsIncluded();
if (extensionCatalogsIncluded == null || !extensionCatalogsIncluded) {
mavenConfig = remote.getMaven();
}
}
}
} else if (remote.getMaven() != null && !isMavenConfigComplete(mavenConfig)) {
mavenConfig = RegistryMavenConfig.builder()
.setRepository(completeMavenRepoConfig(mavenConfig.getRepository(), remote.getMaven().getRepository()));
}View on GitHub (pinned to e1c734241f)
Solutions
- Remove the `maven:` (repository) block if you want extension catalogs included from the registry metadata
- Set `extension-catalogs-included: false` (or omit it) if you want the custom maven repository layout to govern extension resolution
- Keep only one of the two options per registry and validate the YAML after editing
Example fix
# before
local:
extension-catalogs-included: true
maven:
repository:
url: https://acme.org/maven
# after
local:
maven:
repository:
url: https://acme.org/maven Defensive patterns
Strategy: validation
Validate before calling
Boolean eci = registry.getLocal() != null ? registry.getLocal().getExtensionCatalogsIncluded() : null;
if (Boolean.TRUE.equals(eci) && registry.getLocal().getMaven() != null && registry.getLocal().getMaven().getRepository() != null) {
throw new IllegalStateException("extension-catalogs-included and maven.repository are mutually exclusive for registry " + registry.getId());
} Try / catch
try { client = factory.buildRegistryClient(cfg); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith("Either extension-catalogs-included")) { dropMavenRepoBlock(cfg); } else throw e; } Prevention
- Choose one extension-resolution strategy per registry
- Review merged config snippets for duplicate option blocks
- Document registry local config in your team's config template
When it happens
Trigger: Building a MavenRegistryClient via completeRegistryConfig/completeRegistryPlatformConfig where RegistryMavenConfigContainer.getExtensionCatalogsIncluded() is Boolean.TRUE and getMaven().getRepository() is non-null at the same time.
Common situations: Copying a registry config snippet that had extension-catalogs-included and pasting in a maven.repository section from another example; upgrading a config where one option was previously silently ignored.
Related errors
- The registry descriptor configuration is missing for ${confi
- Malformed URL: + url
- Couldn't resolve the Quarkus platform catalog since none of
- Unable to find the TLS configuration for name ${name}.
- ConflictStrategyHandler named '" + entry.getValue() + "' not
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/88f384580d3f5881.
Report an issue: GitHub.