String (Project project, String workingDir) { MavenHomeType homeType = MavenWorkspaceSettingsComponent.getInstance(project).getSettings().getGeneralSettings().getMavenHomeType(); if (homeType instanceof StaticResolvedMavenHomeType srmt) { return getMavenVersion(srmt); } MavenDistribution distribution = MavenDistributionsCache.getInstance(project).getWrapper(workingDir); if (distribution != null) return distribution.getVersion(); return null; }