{"record":{"id":"8f042cd45c7f0841","repo":"quarkusio/quarkus","slug":"neither-the-application-artifact-nor-the-project-r","errorCode":null,"errorMessage":"Neither the application artifact nor the project root path has been provided","messagePattern":"Neither the application artifact nor the project root path has been provided","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java","lineNumber":234,"sourceCode":"            return result;\n        }\n\n        return resolveAppModelForWorkspace();\n    }\n\n    /**\n     * Resolves an application for a project in a workspace.\n     *\n     * @return application model\n     * @throws BootstrapException in case of a failure\n     */\n    private CurationResult resolveAppModelForWorkspace() throws BootstrapException {\n        ResolvedDependency appArtifact = this.appArtifact;\n        try {\n            LocalProject localProject = null;\n            if (appArtifact == null) {\n                if (projectRoot == null) {\n                    throw new IllegalArgumentException(\n                            \"Neither the application artifact nor the project root path has been provided\");\n                }\n                localProject = enableClasspathCache ? loadWorkspace() : LocalProject.load(projectRoot, false);\n                if (localProject == null) {\n                    log.warn(\"Unable to locate the maven project on the filesystem\");\n                    throw new BootstrapException(\n                            \"Failed to determine the Maven artifact associated with the application \" + projectRoot);\n                }\n                appArtifact = localProject.getAppArtifact();\n            }\n\n            Path cachedCpPath = null;\n\n            LocalWorkspace workspace = null;\n            if (enableClasspathCache) {\n                if (localProject == null) {\n                    localProject = loadWorkspace();\n                }","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java#L216-L252","documentation":"resolveAppModelForWorkspace() requires at least one of the application artifact or the project root path to locate the workspace. When both are null it throws IllegalArgumentException immediately, since there is nothing to resolve an app model against.","triggerScenarios":"Building a BootstrapAppModelFactory via its builder without calling either setAppArtifact(...) or setProjectRoot(...), then invoking resolveAppModel() (which delegates to resolveAppModelForWorkspace).","commonSituations":"Programmatic bootstrap (tests, tooling, dev-mode launchers) where the builder configuration was assembled conditionally and both setters were skipped; refactorings that renamed the config key feeding projectRoot so the value became null.","solutions":["Call setProjectRoot(Path) with the application project directory on the factory/builder before resolving","Or provide the app artifact via setAppArtifact(...) (GAV of the application)","Check the configuration source that should have supplied projectRoot/appArtifact — a missing or misnamed property often leaves both null"],"exampleFix":"// before\nBootstrapAppModelFactory.newInstance(curateMode).build();\n// after\nBootstrapAppModelFactory.newInstance(curateMode)\n    .setProjectRoot(Path.of(\"/path/to/project\"))\n    .build();","handlingStrategy":"validation","validationCode":"Objects.requireNonNull(projectRoot, \"projectRoot or appArtifact must be set before resolveAppModel()\");\nif (projectRoot == null && appArtifact == null) {\n    throw new IllegalArgumentException(\"Set setProjectRoot(...) or setAppArtifact(...) on the factory\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    return factory.resolveAppModel();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"Neither the application artifact nor the project root path\")) {\n        throw new IllegalStateException(\"Bootstrap factory misconfigured: supply projectRoot or appArtifact\", e);\n    }\n    throw e;\n}","preventionTips":["Always call setProjectRoot(...) (or setAppArtifact(...)) on BootstrapAppModelFactory before resolving","When building the factory conditionally, assert at least one input was configured before build","Trace the config property feeding projectRoot if it arrives null at runtime"],"tags":["bootstrap","configuration","workspace","missing-argument"],"backgroundTag":"missing-required-input","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"}