{"record":{"id":"88f384580d3f5881","repo":"quarkusio/quarkus","slug":"either-extension-catalogs-included-or-mavenconfig","errorCode":null,"errorMessage":"Either extension-catalogs-included or mavenConfig/repository configuration can be enabled at the same time","messagePattern":"Either extension-catalogs-included or mavenConfig/repository configuration can be enabled at the same time","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/client/maven/MavenRegistryClientFactory.java","lineNumber":312,"sourceCode":"                ? remote.getRecognizedVersionsExpression()\n                : local.getRecognizedVersionsExpression());\n        return complete;\n    }\n\n    private static RegistryPlatformsConfig completeRegistryPlatformConfig(RegistryPlatformsConfig local,\n            RegistryPlatformsConfig remote) {\n        if (local == null) {\n            return remote;\n        }\n        if (isPlatformsConfigComplete(local, remote)) {\n            return local;\n        }\n\n        Boolean extensionCatalogsIncluded = local.getExtensionCatalogsIncluded();\n        RegistryMavenConfig mavenConfig = null;\n        if (local.getMaven() != null && local.getMaven().getRepository() != null) {\n            if (extensionCatalogsIncluded != null && extensionCatalogsIncluded) {\n                throw new IllegalArgumentException(\n                        \"Either extension-catalogs-included or mavenConfig/repository configuration can be enabled at the same time\");\n            }\n            mavenConfig = local.getMaven();\n        }\n\n        if (mavenConfig == null) {\n            if (extensionCatalogsIncluded == null || !extensionCatalogsIncluded) {\n                if (extensionCatalogsIncluded == null) {\n                    extensionCatalogsIncluded = remote.getExtensionCatalogsIncluded();\n                    if (extensionCatalogsIncluded == null || !extensionCatalogsIncluded) {\n                        mavenConfig = remote.getMaven();\n                    }\n                }\n            }\n        } else if (remote.getMaven() != null && !isMavenConfigComplete(mavenConfig)) {\n            mavenConfig = RegistryMavenConfig.builder()\n                    .setRepository(completeMavenRepoConfig(mavenConfig.getRepository(), remote.getMaven().getRepository()));\n        }","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/client/maven/MavenRegistryClientFactory.java#L294-L330","documentation":"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.","triggerScenarios":"Building a MavenRegistryClient via completeRegistryConfig/completeRegistryPlatformConfig where RegistryMavenConfigContainer.getExtensionCatalogsIncluded() is Boolean.TRUE and getMaven().getRepository() is non-null at the same time.","commonSituations":"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.","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"],"exampleFix":"# before\nlocal:\n  extension-catalogs-included: true\n  maven:\n    repository:\n      url: https://acme.org/maven\n# after\nlocal:\n  maven:\n    repository:\n      url: https://acme.org/maven","handlingStrategy":"validation","validationCode":"Boolean eci = registry.getLocal() != null ? registry.getLocal().getExtensionCatalogsIncluded() : null;\nif (Boolean.TRUE.equals(eci) && registry.getLocal().getMaven() != null && registry.getLocal().getMaven().getRepository() != null) {\n    throw new IllegalStateException(\"extension-catalogs-included and maven.repository are mutually exclusive for registry \" + registry.getId());\n}","typeGuard":null,"tryCatchPattern":"try { client = factory.buildRegistryClient(cfg); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Either extension-catalogs-included\")) { dropMavenRepoBlock(cfg); } else throw e; }","preventionTips":["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"],"tags":["configuration","registry","yaml"],"backgroundTag":"conflicting-config-options","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}