{"record":{"id":"04d21659c7a76c6b","repo":"quarkusio/quarkus","slug":"top-level-project-base-directory-dir-specified-w","errorCode":null,"errorMessage":"Top-level project base directory <dir> specified with system property maven.top.level.project.basedir does not exist","messagePattern":"Top-level project base directory <dir> specified with system property maven\\.top\\.level\\.project\\.basedir does not exist","errorType":"exception","errorClass":"BootstrapMavenException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java","lineNumber":1523,"sourceCode":"        }\n\n        setKotlinSpecificFlags(builder);\n        setAnnotationProcessorFlags(builder);\n\n        // path to the serialized application model\n        final Path appModelLocation = resolveSerializedModelLocation();\n\n        ApplicationModel appModel = bootstrapProvider.getResolvedApplicationModel(\n                QuarkusBootstrapProvider.getProjectId(project), getLaunchModeClasspath(), bootstrapId);\n        if (appModel != null) {\n            bootstrapProvider.close();\n        } else {\n            Path rootProjectDir = null;\n            String topLevelBaseDirStr = systemProperties.get(BootstrapMavenContext.MAVEN_TOP_LEVEL_PROJECT_BASEDIR);\n            if (topLevelBaseDirStr != null) {\n                final Path tmp = Path.of(topLevelBaseDirStr);\n                if (!Files.exists(tmp)) {\n                    throw new BootstrapMavenException(\"Top-level project base directory \" + topLevelBaseDirStr\n                            + \" specified with system property \" + BootstrapMavenContext.MAVEN_TOP_LEVEL_PROJECT_BASEDIR\n                            + \" does not exist\");\n                }\n                rootProjectDir = tmp;\n            }\n\n            final BootstrapMavenContextConfig<?> mvnConfig = BootstrapMavenContext.config()\n                    .setUserSettings(session.getRequest().getUserSettingsFile())\n                    .setRemoteRepositories(repos)\n                    .setWorkspaceDiscovery(true)\n                    .setPreferPomsFromWorkspace(true)\n                    .setCurrentProject(QuarkusBootstrapProvider.getOriginalPomFile(project).toString())\n                    .setEffectiveModelBuilder(BootstrapMavenContextConfig.getEffectiveModelBuilderProperty(projectProperties))\n                    .setRootProjectDir(rootProjectDir);\n            // to support Maven plugins and extensions manipulating POM files\n            QuarkusBootstrapProvider.setProvidedModules(mvnConfig, session, toFiles(reloadPoms));\n\n            // There are a couple of reasons we don't want to use the original Maven session:","sourceCodeStart":1505,"sourceCodeEnd":1541,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java#L1505-L1541","documentation":"DevMojo honors the maven.top.level.project.basedir system property to locate the root directory of a multi-module build. If the property is set but the path it points to does not exist on disk, BootstrapMavenException is thrown with this message. The property is typically used by IDEs or tooling to override Maven's notion of the top-level project.","triggerScenarios":"Starting dev mode with -Dmaven.top.level.project.basedir=/some/path where the path was deleted, renamed, or is spelled incorrectly, or where a container/CI environment lacks the host-path directory the IDE passed in.","commonSituations":"Stale IDE run configuration pointing at a moved project folder; Docker/container dev setups forwarding a property with a host path that does not exist inside the container; typo or trailing-slash mismatch in scripts; workspace folder renamed.","solutions":["Set maven.top.level.project.basedir to an existing absolute directory of the top-level project.","Remove the -Dmaven.top.level.project.basedir property if you do not intentionally need it.","Update IDE run configurations or scripts after moving/renaming the project.","In containers, ensure the path exists inside the container or map the host directory to the same path via a volume."],"exampleFix":"// before\nmvn quarkus:dev -Dmaven.top.level.project.basedir=/home/user/old-project\n// after\nmvn quarkus:dev -Dmaven.top.level.project.basedir=/home/user/new-project","handlingStrategy":"validation","validationCode":"// validate the system property path before starting dev mode\nString dir = System.getProperty(\"maven.top.level.project.basedir\");\nif (dir != null && !Files.isDirectory(Path.of(dir))) {\n    throw new IllegalStateException(\"maven.top.level.project.basedir does not exist: \" + dir);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only set maven.top.level.project.basedir when intentionally overriding the top-level project.","Update IDE run configurations after moving or renaming the workspace.","Use absolute, existing paths in scripts.","In containers, mount host directories at identical paths."],"tags":["maven","dev-mode","configuration","system-property","quarkus"],"backgroundTag":"invalid-path-system-property","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"}