String (MavenRunConfiguration runConfiguration) { MavenGeneralSettings generalSettings = runConfiguration.getGeneralSettings(); if (generalSettings == null) { MavenDistribution maven = MavenDistributionsCache.getInstance(runConfiguration.getProject()) .getMavenDistribution(runConfiguration.getRunnerParameters().getWorkingDirPath()); return maven.getVersion(); } else { MavenHomeType type = generalSettings.getMavenHomeType(); if (type instanceof StaticResolvedMavenHomeType st) { return MavenUtil.getMavenVersion(st); } else { return MavenDistributionsCache.getInstance(runConfiguration.getProject()) .getMavenDistribution(runConfiguration.getRunnerParameters().getWorkingDirPath()).getVersion(); } } }