{"record":{"id":"cab197227bdb6ca8","repo":"quarkusio/quarkus","slug":"the-version-2-cli-can-not-be-used-with-quarkus-1-x","errorCode":null,"errorMessage":"The version 2 CLI can not be used with Quarkus 1.x projects.\nUse the maven/gradle plugins when working with Quarkus 1.x projects.","messagePattern":"The version 2 CLI can not be used with Quarkus 1\\.x projects\\.\nUse the maven/gradle plugins when working with Quarkus 1\\.x projects\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"devtools/cli-common/src/main/java/io/quarkus/cli/common/registry/RegistryClientMixin.java","lineNumber":62,"sourceCode":"        return config;\n    }\n\n    public RegistriesConfig resolveConfig() throws RegistryResolutionException {\n        return config == null\n                ? RegistriesConfig.resolveConfig()\n                : RegistriesConfig.resolveFromFile(Path.of(config));\n    }\n\n    public QuarkusProject createQuarkusProject(Path projectRoot, TargetQuarkusPlatformGroup targetVersion, BuildTool buildTool,\n            OutputOptionMixin log) throws RegistryResolutionException {\n        return createQuarkusProject(projectRoot, targetVersion, buildTool, log, List.of());\n    }\n\n    public QuarkusProject createQuarkusProject(Path projectRoot, TargetQuarkusPlatformGroup targetVersion, BuildTool buildTool,\n            OutputOptionMixin log, Collection<String> extensions) throws RegistryResolutionException {\n        ExtensionCatalog catalog = getExtensionCatalog(targetVersion, log);\n        if (VALIDATE && catalog.getQuarkusCoreVersion().startsWith(\"1.\")) {\n            throw new UnsupportedOperationException(\"The version 2 CLI can not be used with Quarkus 1.x projects.\\n\"\n                    + \"Use the maven/gradle plugins when working with Quarkus 1.x projects.\");\n        }\n        catalog = CreateProjectHelper.completeCatalog(catalog, extensions, QuarkusProjectHelper.artifactResolver());\n        return QuarkusProjectHelper.getProject(projectRoot, catalog, buildTool, JavaVersion.NA, log);\n    }\n\n    ExtensionCatalog getExtensionCatalog(TargetQuarkusPlatformGroup targetVersion, OutputOptionMixin log)\n            throws RegistryResolutionException {\n        log.debug(\"Resolving Quarkus extension catalog for \" + targetVersion);\n        QuarkusProjectHelper.setMessageWriter(log);\n        if (enabled()) {\n            QuarkusProjectHelper.setToolsConfig(resolveConfig());\n        }\n\n        if (VALIDATE && targetVersion.isStreamSpecified() && !enabled()) {\n            throw new UnsupportedOperationException(\n                    \"Specifying a stream (--stream) requires the registry client to resolve resources. \" +\n                            \"Please try again with the registry client enabled (--registry-client)\");","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/cli-common/src/main/java/io/quarkus/cli/common/registry/RegistryClientMixin.java#L44-L80","documentation":"RegistryClientMixin.createQuarkusProject resolves the extension catalog first; when the registry client validation is on and the resolved catalog reports a Quarkus core version starting with \"1.\", it throws this UnsupportedOperationException. The version 2 CLI cannot create projects for Quarkus 1.x platforms, which must be managed with the Maven or Gradle plugins of that era.","triggerScenarios":"Calling createQuarkusProject(...) (or the `quarkus create` CLI command) with a target/platform that resolves to a Quarkus 1.x core version, e.g. a project or registry pinned to quarkus-bom 1.x.","commonSituations":"Maintaining a legacy Quarkus 1.x application and running `quarkus create app ...` with a stream or platform BOM pointing at 1.x; a parent pom or registry still referencing old 1.x platform coordinates.","solutions":["Target a Quarkus 2.x+ platform: drop explicit 1.x platform/stream selection (e.g. remove -S 1.13 or io.quarkus.platform:quarkus-bom:1.x).","If you truly need a 1.x project, use the Quarkus 1.x Maven/Gradle plugins to generate it instead of the v2 CLI.","Check quarkus.registry settings (quarkus.registry.quarkus-platform-version / config in ~/.quarkus/config.yaml) for a pinned 1.x version and remove it."],"exampleFix":"// before\nquarkus create app com.acme:demo --stream=1.13\n// after\nquarkus create app com.acme:demo --stream=2.16","handlingStrategy":"validation","validationCode":"ExtensionCatalog catalog = /* resolved via getExtensionCatalog */;\nif (catalog.getQuarkusCoreVersion().startsWith(\"1.\")) {\n    throw new IllegalStateException(\"Quarkus 1.x target; use the 1.x Maven/Gradle plugins\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    mixin.createQuarkusProject(root, target, tool, log, extensions);\n} catch (UnsupportedOperationException e) {\n    // fall back to 1.x plugin-based project generation\n}","preventionTips":["Don't pin streams/platform versions to 1.x when using the v2 CLI.","Audit ~/.quarkus/config.yaml and project parent poms for legacy platform versions.","Migrate legacy projects to a supported Quarkus major version."],"tags":["cli","version-mismatch","project-generation"],"backgroundTag":"cli-version-incompatible","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"}