{"record":{"id":"d83ffc53a02f33eb","repo":"quarkusio/quarkus","slug":"failed-to-determine-the-maven-artifact-associated","errorCode":null,"errorMessage":"Failed to determine the Maven artifact associated with the application ","messagePattern":"Failed to determine the Maven artifact associated with the application ","errorType":"exception","errorClass":"BootstrapException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java","lineNumber":240,"sourceCode":"    /**\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                }\n                workspace = localProject.getWorkspace();\n                cachedCpPath = resolveCachedCpPath(localProject);\n                if (Files.exists(cachedCpPath)\n                        && workspace.getLastModified() < Files.getLastModifiedTime(cachedCpPath).toMillis()) {\n                    try {\n                        return new CurationResult(ApplicationModelSerializer.deserialize(cachedCpPath));","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java#L222-L258","documentation":"BootstrapAppModelFactory throws this BootstrapException when it cannot associate the application with a Maven project. It occurs after resolving the local project from the project root: if LocalProject.load (or the cached workspace load) returns null, no pom.xml-based project was found at the given path, so the application artifact cannot be determined.","triggerScenarios":"Calling QuarkusBootstrap/bootstrap APIs with an appArtifact-less configuration where neither the application artifact nor a valid Maven project root is provided; specifically, projectRoot points to a directory that is not a Maven project (no pom.xml in the hierarchy).","commonSituations":"Running Quarkus from a wrong working directory, pointing quarkus.platform/project paths at non-Maven folders, IDE launches where the classes dir is outside any Maven project, renamed/moved pom.xml, or a Gradle project mistakenly driven through the Maven bootstrap path.","solutions":["Verify the projectRoot path points to (or is inside) a directory containing a pom.xml","Provide the application artifact explicitly (groupId:artifactId:version) so the project dir lookup is unnecessary","Set the working directory of the launch to the Maven project root","If relying on workspace/classpath cache, clear stale cache and re-run so the workspace reloads"],"exampleFix":"// before\nQuarkusBootstrap.builder().setProjectRoot(Path.of(\"/opt/random-dir\"))...\n// after\nQuarkusBootstrap.builder().setProjectRoot(Path.of(\"/home/dev/my-quarkus-app\")) // dir containing pom.xml","handlingStrategy":"validation","validationCode":"Path root = Path.of(\"/home/dev/myapp\");\nif (!Files.exists(root.resolve(\"pom.xml\"))) {\n    throw new IllegalArgumentException(\"Not a Maven project root: \" + root);\n}","typeGuard":null,"tryCatchPattern":"try {\n    bootstrap.bootstrap();\n} catch (BootstrapException e) {\n    if (e.getMessage().contains(\"Failed to determine the Maven artifact\")) {\n        // fix projectRoot or supply appArtifact\n    }\n}","preventionTips":["Always point projectRoot at a directory containing pom.xml","Supply the application artifact explicitly when the path is not a Maven project","Set the launcher working directory to the project root","Clear stale classpath caches after moving projects"],"tags":["maven","bootstrap","project-root"],"backgroundTag":"maven-project-not-found","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"}