{"record":{"id":"15721319cde76553","repo":"quarkusio/quarkus","slug":"top-level-project-base-directory-specified-with-s","errorCode":null,"errorMessage":"Top-level project base directory  specified with system property quarkus.bootstrap.maven-top-level-project-root-dir does not exist","messagePattern":"Top-level project base directory  specified with system property quarkus\\.bootstrap\\.maven-top-level-project-root-dir does not exist","errorType":"exception","errorClass":"BootstrapMavenException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/BootstrapMavenContext.java","lineNumber":181,"sourceCode":"        this.localRepoTail = config.localRepoTail;\n        this.localRepoTailIgnoreAvailability = config.localRepoTailIgnoreAvailability;\n        this.offline = config.offline;\n        this.warnOnFailingWorkspaceModules = config.warnOnFailedWorkspaceModules;\n        this.repoSystem = config.repoSystem;\n        this.repoSession = config.repoSession;\n        this.remoteRepos = config.remoteRepos;\n        this.remotePluginRepos = config.remotePluginRepos;\n        this.remoteRepoManager = config.remoteRepoManager;\n        this.settingsDecrypter = config.settingsDecrypter;\n        this.cliOptions = config.cliOptions;\n        this.excludeSisuBeanPackages = config.getExcludeSisuBeanPackages();\n        this.includeSisuBeanPackages = config.getIncludeSisuBeanPackages();\n        if (config.rootProjectDir == null) {\n            final String topLevelBaseDirStr = PropertyUtils.getProperty(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 \" + MAVEN_TOP_LEVEL_PROJECT_BASEDIR + \" does not exist\");\n                }\n                this.rootProjectDir = tmp;\n            }\n        } else {\n            this.rootProjectDir = config.rootProjectDir;\n        }\n        this.preferPomsFromWorkspace = config.preferPomsFromWorkspace;\n        this.effectiveModelBuilder = config.effectiveModelBuilder;\n        this.wsModuleParentHierarchy = config.wsModuleParentHierarchy;\n        this.userSettings = config.userSettings;\n        if (config.currentProject != null) {\n            this.currentProject = config.currentProject;\n            this.currentPom = currentProject.getRawModel().getPomFile().toPath();\n            this.workspace = config.currentProject.getWorkspace();\n        } else if (config.workspaceDiscovery) {\n            currentProject = resolveCurrentProject(config.providedModules);\n            this.workspace = currentProject == null ? null : currentProject.getWorkspace();","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/BootstrapMavenContext.java#L163-L199","documentation":"Thrown as a BootstrapMavenException in the BootstrapMavenContext constructor: when no rootProjectDir was supplied in the config, Quarkus reads the system property quarkus.bootstrap.maven-top-level-project-base-dir; if that property is set but the path does not exist on disk, construction fails immediately.","triggerScenarios":"Launching an app/test with -Dquarkus.bootstrap.maven-top-level-project-base-dir=/some/path where /some/path does not exist (typo, relative path resolved from the wrong working dir, path deleted before run, test runner cwd differing from expectation).","commonSituations":"IDE run configurations passing stale absolute paths; CI checking out to a different directory than the hardcoded property; relative path assumptions broken by Gradle/Maven daemon working directories.","solutions":["Correct the system property value to an existing absolute path","Remove the property if a top-level root dir is not actually needed","Create the directory if it is supposed to exist (e.g. in CI scripts before the build)","In tests/launch configs, derive the path from the module directory rather than hardcoding it"],"exampleFix":"// before\n-Dquarkus.bootstrap.maven-top-level-project-base-dir=/home/user/old-project\n// after\n-Dquarkus.bootstrap.maven-top-level-project-base-dir=/home/user/projects/current-project","handlingStrategy":"validation","validationCode":"String dir = System.getProperty(\"quarkus.bootstrap.maven-top-level-project-base-dir\");\nif (dir != null && !java.nio.file.Files.isDirectory(java.nio.file.Path.of(dir))) {\n    throw new IllegalStateException(\"quarkus.bootstrap.maven-top-level-project-base-dir points to a missing dir: \" + dir);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use absolute paths for this property","Set the property programmatically in tests from the project base dir (e.g. MavenProject basedir), never hardcoded","Remove the property when not needed","In CI, export the checkout path once and reference it consistently"],"tags":["configuration","system-property","filesystem"],"backgroundTag":"missing-env-var","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}