{"record":{"id":"81e36c419d571940","repo":"apache/maven","slug":"the-builder-requested-using-id-s-cannot-be-foun","errorCode":null,"errorMessage":"The builder requested using id = %s cannot be found","messagePattern":"The builder requested using id = (.+?) cannot be found","errorType":"exception","errorClass":"BuilderNotFoundException","httpStatus":null,"severity":"error","filePath":"impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleStarter.java","lineNumber":112,"sourceCode":"            if (projectBuilds.isEmpty()) {\n                throw new NoGoalSpecifiedException(\"No goals have been specified for this build.\"\n                        + \" You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or\"\n                        + \" <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>.\"\n                        + \" Available lifecycle phases are: \" + defaultLifeCycles.getLifecyclePhaseList() + \".\");\n            }\n\n            if (logger.isDebugEnabled()) {\n                lifecycleDebugLogger.debugReactorPlan(projectBuilds);\n            }\n\n            ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader();\n            ReactorBuildStatus reactorBuildStatus = new ReactorBuildStatus(session.getProjectDependencyGraph());\n            reactorContext = new ReactorContext(result, oldContextClassLoader, reactorBuildStatus);\n\n            String builderId = session.getRequest().getBuilderId();\n            Builder builder = builders.get(builderId);\n            if (builder == null) {\n                throw new BuilderNotFoundException(\n                        String.format(\"The builder requested using id = %s cannot be\" + \" found\", builderId));\n            }\n\n            int degreeOfConcurrency = session.getRequest().getDegreeOfConcurrency();\n            if (degreeOfConcurrency > 1) {\n                logger.info(\"\");\n                logger.info(String.format(\n                        \"Using the %s implementation with a thread count of %d\",\n                        builder.getClass().getSimpleName(), degreeOfConcurrency));\n            }\n            builder.build(session, reactorContext, projectBuilds, taskSegments, reactorBuildStatus);\n\n        } catch (Exception e) {\n            result.addException(e);\n        } finally {\n            eventCatapult.fire(ExecutionEvent.Type.SessionEnded, session, null);\n        }\n    }","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleStarter.java#L94-L130","documentation":"DefaultLifecycleStarter resolves the builder from a map of registered Builder components using the id from MavenExecutionRequest.getBuilderId() (set by -b/--builder). If no Builder component is registered under that id, the session aborts with BuilderNotFoundException before the reactor starts.","triggerScenarios":"Running mvn -b someId where someId is neither a built-in id (e.g. 'singlethreaded', 'multithreaded') nor a Builder contributed by a loaded extension; typo in the builder id in .mvn/maven.config or CI args; an extension that used to register the builder not being applied (deactivated profile, removed extension).","commonSituations":"Copying -b config from a project whose custom builder extension is not present in yours; -Dmaven.builder=id typos; migrating CI images to a Maven distribution missing the extension that provides the builder.","solutions":["Use a stock builder id: mvn -b multithreaded (default) or -b singlethreaded","If a custom builder is intended, add the extension that provides it to the project (core extension in .mvn/extensions.xml or build extension) so the component gets registered","Remove or fix the -b/--builder flag in .mvn/maven.config, MAVEN_ARGS, or the CI command","Run with -X to see the available builder ids registered in the container"],"exampleFix":"# before\nmvn -b mycustombuilder package   # no such Builder -> BuilderNotFoundException\n\n# after\nmvn -b multithreaded package\n# or register the builder via .mvn/extensions.xml and keep -b mycustombuilder","handlingStrategy":"validation","validationCode":"// verify the builder id is registered before starting the session\nif (!builders.containsKey(request.getBuilderId())) {\n    throw new IllegalArgumentException(\"Unknown builder id: \" + request.getBuilderId()\n        + \", available: \" + builders.keySet());\n}","typeGuard":null,"tryCatchPattern":"catch (BuilderNotFoundException e) {\n    // fall back to the default 'multithreaded' builder or load the missing extension and retry\n}","preventionTips":["Restrict CI to stock builder ids unless the extension providing yours is pinned in the project","Keep -b values and .mvn/extensions.xml in the same repo so they ship together","Document required extensions next to builder configuration"],"tags":["maven","builder","cli-flag","extension","configuration"],"backgroundTag":"unknown-builder-id","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}